Skip to content

Commit c142856

Browse files
feat: use array unpacking
Co-authored-by: John Paul E. Balandan, CPA <paulbalandan@gmail.com>
1 parent 8c35a48 commit c142856

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Commands/Generators/Views/usermodel.tpl.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ class {class} extends UserModel
1111
protected function initialize(): void
1212
{
1313
// Merge properties with parent
14-
$this->allowedFields = array_merge($this->allowedFields, [
14+
$this->allowedFields = [
15+
...$this->allowedFields,
1516
// Add here your custom fields
1617
// 'first_name',
17-
]);
18+
];
1819
}
1920
}
2021

0 commit comments

Comments
 (0)