Skip to content

Commit

Permalink
Update AllowedFilter.php to include getFilterClass function (#909)
Browse files Browse the repository at this point in the history
* Update AllowedFilter.php to include getFilterClass

requires if you need to rebuild the filter on the fly

* Update AllowedFilter.php -> getFilterClass return type
  • Loading branch information
justasSendrauskas authored Jan 8, 2024
1 parent 6abad36 commit e365a94
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/AllowedFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ public static function custom(string $name, Filter $filterClass, $internalName =
return new static($name, $filterClass, $internalName);
}

public function getFilterClass(): \Spatie\QueryBuilder\Filters\Filter
{
return $this->filterClass;
}

public function getName(): string
{
return $this->name;
Expand Down

1 comment on commit e365a94

@taskinbirtan
Copy link

@taskinbirtan taskinbirtan commented on e365a94 Jan 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey guys

My custom AllowedFilter class derived from Spatie\QueryBuilder\AllowedFilter
my builds have failed because I haven't derieved it from SpatieFilter class.

image

Please sign in to comment.