Skip to content

Commit

Permalink
fix: sortable filter update
Browse files Browse the repository at this point in the history
  • Loading branch information
binaryk committed Sep 7, 2023
1 parent de65330 commit cf74388
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Filters/SortableFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class SortableFilter extends Filter
public function filter(RestifyRequest $request, Builder|Relation $query, $value)
{
if (isset($this->resolver) && is_callable($this->resolver)) {
return call_user_func($this->resolver, $request, $query, $value);
return call_user_func($this->resolver, $request, $query, $value, $this->column());
}

if (isset($this->relation)) {
Expand Down Expand Up @@ -155,7 +155,7 @@ public function syncDirection(string $direction = null): self
return $this->asc();
}

public function usingClosure(Closure $closure): self
public function usingClosure(callable|Closure $closure): self
{
$this->resolver = $closure;

Expand Down

0 comments on commit cf74388

Please sign in to comment.