File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
user_guide_src/source/models/model Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -724,7 +724,7 @@ protected function doProtectFieldsForInsert(array $row): array
724724 * @param array<string, mixed>|object $attributes
725725 * @param array<string, mixed>|object $values
726726 */
727- public function firstOrInsert (array |object $ attributes , array |object $ values = []): array |object | false
727+ public function firstOrInsert (array |object $ attributes , array |object $ values = []): array |false | object
728728 {
729729 if (is_object ($ attributes )) {
730730 $ attributes = $ this ->transformDataToArray ($ attributes , 'insert ' );
Original file line number Diff line number Diff line change 11<?php
22
33// All lookup attributes can be passed as an object or Entity.
4- $ attrs = new stdClass ();
4+ $ attrs = new \ stdClass ();
55$ attrs ->email = 'john@example.com ' ;
66
77$ user = $ userModel ->firstOrInsert ($ attrs , ['name ' => 'John Doe ' , 'country ' => 'US ' ]);
You can’t perform that action at this time.
0 commit comments