Join GitHub today
[5.8] Changed Collection::firstWhere signature to be the same as Collection::where #26261
This small PR makes the collection convenience method
Image we have a Post model with a boolean property published, if we wanted to retrieve the first published post we could do this
But if we use the convenience method
# We have to pass true here, because the second argument is required $collection->firstWhere('published', true)
With this PR the second argument to
This PR is the same as #26260, but targets and branches from the correct branch.