feat: add filter type "not"
This commit is contained in:
parent
eb06d4d033
commit
af9762945b
|
@ -5,5 +5,6 @@ namespace App\Facade\Filters;
|
|||
enum FilterTypeEnum: string
|
||||
{
|
||||
case Is = 'is';
|
||||
case Not = 'not';
|
||||
case Like = 'like';
|
||||
}
|
|
@ -54,6 +54,9 @@ class Filters
|
|||
case FilterTypeEnum::Is:
|
||||
$builder->where($filter->column, $filter->filter);
|
||||
break;
|
||||
case FilterTypeEnum::Not:
|
||||
$builder->whereNot($filter->column, $filter->filter);
|
||||
break;
|
||||
case FilterTypeEnum::Like:
|
||||
$builder->whereLike($filter->column, $filter->filter);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue