mohammadabusultan / laravel-filter
A Laravel package for adding filter functionality to models.
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/mohammadabusultan/laravel-filter
Requires
- php: ^8.0
- illuminate/database: *
- illuminate/support: *
This package is auto-updated.
Last update: 2025-12-04 20:04:47 UTC
README
A laravel package to filter via your models .
installation :
composer require mohammadabusultan/laravel-filter
Usage :
- use
Filterabletrait in your model - Define
$filtersarray property in your model to select which columns to filter in
Example :
use Mohammadabusultan\LaravelFilter\Filterable;
class User extends Model {
use Filterable ;
protected $filters = ['name' => 'like', 'status' => '=', 'posts.title' => 'like'];
public function posts(){
return $this->hasMany(Post::class);
}