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;
2121
2222 public function first ($ columns = ['* ' ]): mixed ;
2323
24- public function firstOrNew (array $ attributes = []): mixed ;
24+ public function firstOrNew (array $ attributes, array $ values = []): mixed ;
2525
26- public function firstOrCreate (array $ attributes = []): mixed ;
26+ public function firstOrCreate (array $ attributes, array $ values = []): mixed ;
2727
2828 public function limit ($ limit , $ columns = ['* ' ]): mixed ;
2929
Original file line number Diff line number Diff line change @@ -152,27 +152,28 @@ public function first($columns = ['*']): mixed
152152 return $ result ;
153153 }
154154
155- public function firstOrNew (array $ attributes = []): mixed
155+ public function firstOrNew (array $ attributes, array $ values = []): mixed
156156 {
157157 $ this ->applyCriteria ();
158158 $ this ->applyScope ();
159159
160- $ model = $ this ->model ->firstOrNew ($ attributes );
160+ $ model = $ this ->model ->firstOrNew ($ attributes, $ values );
161161
162162 $ this ->resetModel ();
163163
164164 return $ model ;
165165 }
166166
167- public function firstOrCreate (array $ attributes = []): mixed
167+ public function firstOrCreate (array $ attributes, array $ values = []): mixed
168168 {
169169 $ this ->applyCriteria ();
170170 $ this ->applyScope ();
171171
172- $ model = $ this ->model ->firstOrCreate ($ attributes );
173-
172+ $ model = $ this ->model ->firstOrCreate ($ attributes , $ values );
174173 $ this ->resetModel ();
175174
175+ event (new RepositoryEntityCreated ($ this , $ model ));
176+
176177 return $ model ;
177178 }
178179
You can’t perform that action at this time.
0 commit comments