Commit dcbb61a
[5.4] Check if Collection is empty and prevent exception on fresh method. (laravel#19671)
* Add fresh method on Eloquent/Collection.
* Rewrite completely the method to avoid multiple database calls.
Add full tests for Model::fresh() and Collection::fresh() methods.
* Update tests for php5.6 and Carbon v1.20.0
* Check if collection is empty and prevent exception.
* styleCI1 parent e306fdb commit dcbb61a
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
360 | 366 | | |
361 | 367 | | |
362 | 368 | | |
| |||
0 commit comments