From e955b2bd7fa76ba6b0bd80aea59a17c99de8266c Mon Sep 17 00:00:00 2001 From: Tajim Date: Mon, 21 Sep 2026 22:32:49 +0600 Subject: [PATCH] fix(products): cache product list as array to avoid model serialization issues --- app/Http/Controllers/ProductController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/ProductController.php b/app/Http/Controllers/ProductController.php index de8dd6c1..d2745a65 100644 --- a/app/Http/Controllers/ProductController.php +++ b/app/Http/Controllers/ProductController.php @@ -18,7 +18,8 @@ public function index(): Response return Product::where('is_active', true) ->orderBy('sort_order') ->orderBy('id') - ->get(); + ->get() + ->toArray(); }); return Inertia::render('Products', [