From 827a2464b940fd46db3c3c2ae6d298bcdd40c7a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ewilan=20Rivi=C3=A8re?= Date: Wed, 24 Jan 2024 13:14:26 +0100 Subject: [PATCH] Refactor front() method to use inertia() instead of loadRequest() and paginate(). --- src/Queries/BaseQuery.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Queries/BaseQuery.php b/src/Queries/BaseQuery.php index ec84f5f..94ac66c 100644 --- a/src/Queries/BaseQuery.php +++ b/src/Queries/BaseQuery.php @@ -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(); } /**