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
|
enum FilterTypeEnum: string
|
||||||
{
|
{
|
||||||
case Is = 'is';
|
case Is = 'is';
|
||||||
|
case Not = 'not';
|
||||||
case Like = 'like';
|
case Like = 'like';
|
||||||
}
|
}
|
|
@ -54,6 +54,9 @@ class Filters
|
||||||
case FilterTypeEnum::Is:
|
case FilterTypeEnum::Is:
|
||||||
$builder->where($filter->column, $filter->filter);
|
$builder->where($filter->column, $filter->filter);
|
||||||
break;
|
break;
|
||||||
|
case FilterTypeEnum::Not:
|
||||||
|
$builder->whereNot($filter->column, $filter->filter);
|
||||||
|
break;
|
||||||
case FilterTypeEnum::Like:
|
case FilterTypeEnum::Like:
|
||||||
$builder->whereLike($filter->column, $filter->filter);
|
$builder->whereLike($filter->column, $filter->filter);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue