Skip to content

Commit

Permalink
Changing the input arguments of the defaultSort function for more pow…
Browse files Browse the repository at this point in the history
…er in the input of this function (#904)
  • Loading branch information
MajidMohammadian authored Jan 8, 2024
1 parent b6f3532 commit 1492d60
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Concerns/SortsQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ public function allowedSorts($sorts): static
*/
public function defaultSort($sorts): static
{
return $this->defaultSorts(func_get_args());
$sorts = is_array($sorts) ? $sorts : func_get_args();

return $this->defaultSorts($sorts);
}

/**
Expand Down

0 comments on commit 1492d60

Please sign in to comment.