Installation
About 225 wordsLess than 1 minute
installationsetuprequirements
Requirements
- Laravel 10, 11, 12, or 13
- A PHP version supported by your Laravel release. Laravel 13 requires PHP 8.3 or later.
Install the package
composer require kettasoft/filterableRegister the service provider
Register FilterableServiceProvider before running the package commands.
For Laravel 11, 12, and 13, add it to bootstrap/providers.php:
return [
App\Providers\AppServiceProvider::class,
Kettasoft\Filterable\Providers\FilterableServiceProvider::class,
];For Laravel 10, add it to the providers array in config/app.php:
'providers' => [
// ...
Kettasoft\Filterable\Providers\FilterableServiceProvider::class,
],Run the setup command
The setup command publishes config/filterable.php and creates the default filters directory:
php artisan filterable:setupTo publish individual resources instead:
php artisan vendor:publish --tag=filterable-config
php artisan vendor:publish --tag=filterable-stubsCreate your first filter
php artisan filterable:make-filter PostFilter --filters=title,statusThis creates app/Http/Filters/PostFilter.php by default. You can change the default path and namespace in config/filterable.php, or override them for one command:
php artisan filterable:make-filter PostFilter \
--namespace="Modules\\Blog\\App\\Filters" \
--path="Modules/Blog/app/Filters"Continue with the Quick Start to build your first filtered endpoint. If you already know the package basics, use Choose an Engine to design your request contract.
