This is the documentation for v3. You can switch versions in the menu on the left/at the top. Check your current version with the following command:
composer show lacodix/laravel-model-filter
Installation
You can install the package via composer:
composer require lacodix/laravel-model-filter
Config file
The package brings a config file and views with translations, that can be published.
php artisan vendor:publish --tag="model-filter-config"
This is the content of the published config file:
return [
'date_format' => 'Y-m-d',
'search_query_value_name' => 'search',
'search_query_fields_name' => 'search_for',
];
Views for filter components
You can publish the view components with:
php artisan vendor:publish --tag="lacodix-filter-views"
Translation files for extended filters
You can publish the translation files with:
php artisan vendor:publish --tag="model-filter-translations"
Translations are only needed, if you use one of the extended filters like the TrashedFilter.