jeudi 31 octobre 2019

custom whereIn laravel 5.1 collection

I'm trying to filter some data in Laravel collection, where i want to use whereIn method. But Laravel 5.1 collections does not provide this method. So i am thinking to use Collection::macro in AppServiceProvider, so i can use this method later to other queries. I do not have that much knowledge about how to create this custom collection method. So it would be helpful if someone point me out where i can get the idea how to create custom collection method, or help me to create one!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire