Description
Easily filter eloquent models using arrays - great for filtering from http requests.
class Product extends Model implements IsFilterable{ use Filterable; public function allowedFilters(): AllowedFilterList { return Filter::only( Filter::field('name', [FilterType::EQUAL]), ); }} $products = Product::filter([ [ 'target' => 'name', 'type' => '$eq', 'value' => 'TV' ]])->get();
Recent Courses on Laravel Daily
NativePHP Mobile v4 with SuperNative: Mini-Course
5 lessons
18 min
Mobile Apps: React Native vs Flutter vs NativePHP?
8 lessons
55 min
Testing in Laravel 13 For Beginners
26 lessons
1 h 41 min read