Skip to content

Commit

Permalink
Refactor front() method to use inertia() instead of loadRequest() and…
Browse files Browse the repository at this point in the history
… paginate().
  • Loading branch information
ewilan-riviere committed Jan 24, 2024
1 parent 08489a6 commit 827a246
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Queries/BaseQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,7 @@ protected function setup(string|Builder $model, ?Request $request = null): self
*/
public function front(): QueryResponse
{
$this->loadRequest();

return QueryResponse::make(
original: $this->paginate(),
defaultSort: $this->defaultSort
);
return $this->inertia();
}

/**
Expand Down

0 comments on commit 827a246

Please sign in to comment.