File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Commands/Generators/Views Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ <@php
2+
3+ declare(strict_types=1);
4+
5+ namespace {namespace};
6+
7+ use CodeIgniter\Shield\Models\UserModel;
8+
9+ class {class} extends UserModel
10+ {
11+ protected function initialize(): void
12+ {
13+ // Merge properties with parent
14+ $this->allowedFields = array_merge($this->allowedFields, [
15+ // Add here your custom fields
16+ // 'first_name',
17+ ]);
18+ }
19+ }
20+
Original file line number Diff line number Diff line change @@ -45,4 +45,13 @@ public static function Toolbar(): array
4545 ],
4646 ];
4747 }
48+
49+ public static function Generators (): array
50+ {
51+ return [
52+ 'views ' => [
53+ 'shield:make ' => 'CodeIgniter\Shield\Commands\Generators\Views\usermodel.tpl.php ' ,
54+ ],
55+ ];
56+ }
4857}
You can’t perform that action at this time.
0 commit comments