File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ public function get($columns = ['*']): mixed;
21
21
22
22
public function first ($ columns = ['* ' ]): mixed ;
23
23
24
- public function firstOrNew (array $ attributes = []): mixed ;
24
+ public function firstOrNew (array $ attributes, array $ values = []): mixed ;
25
25
26
- public function firstOrCreate (array $ attributes = []): mixed ;
26
+ public function firstOrCreate (array $ attributes, array $ values = []): mixed ;
27
27
28
28
public function limit ($ limit , $ columns = ['* ' ]): mixed ;
29
29
Original file line number Diff line number Diff line change @@ -152,27 +152,28 @@ public function first($columns = ['*']): mixed
152
152
return $ result ;
153
153
}
154
154
155
- public function firstOrNew (array $ attributes = []): mixed
155
+ public function firstOrNew (array $ attributes, array $ values = []): mixed
156
156
{
157
157
$ this ->applyCriteria ();
158
158
$ this ->applyScope ();
159
159
160
- $ model = $ this ->model ->firstOrNew ($ attributes );
160
+ $ model = $ this ->model ->firstOrNew ($ attributes, $ values );
161
161
162
162
$ this ->resetModel ();
163
163
164
164
return $ model ;
165
165
}
166
166
167
- public function firstOrCreate (array $ attributes = []): mixed
167
+ public function firstOrCreate (array $ attributes, array $ values = []): mixed
168
168
{
169
169
$ this ->applyCriteria ();
170
170
$ this ->applyScope ();
171
171
172
- $ model = $ this ->model ->firstOrCreate ($ attributes );
173
-
172
+ $ model = $ this ->model ->firstOrCreate ($ attributes , $ values );
174
173
$ this ->resetModel ();
175
174
175
+ event (new RepositoryEntityCreated ($ this , $ model ));
176
+
176
177
return $ model ;
177
178
}
178
179
You can’t perform that action at this time.
0 commit comments