feat: add filter type "not"

This commit is contained in:
b1ek 2024-08-30 17:24:23 +10:00
parent eb06d4d033
commit af9762945b
Signed by: blek
GPG Key ID: 14546221E3595D0C
2 changed files with 4 additions and 0 deletions

View File

@ -5,5 +5,6 @@ namespace App\Facade\Filters;
enum FilterTypeEnum: string
{
case Is = 'is';
case Not = 'not';
case Like = 'like';
}

View File

@ -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;