laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.66k stars 11.04k forks source link

[11.x] Add `whereBelongsTo()` Eloquent Collection method #53611

Closed andreapozza closed 3 days ago

andreapozza commented 4 days ago

This method is very similar to its counterpart on the query builder. It accepts either an \Illuminate\Database\Eloquent\Model instance or an \Illuminate\Database\Eloquent\Collection as the first argument. Optionally, the relation name can be specified as the second argument.

taylorotwell commented 3 days ago

Thanks for your pull request to Laravel!

Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.

If applicable, please consider releasing your code as a package so that the community can still take advantage of your contributions!