79098065

Date: 2024-10-17 12:29:49
Score: 1
Natty:
Report link

You need to return an inertia response, not a JSON response.

Just Update your code like this.

use Inertia\Inertia;

public function show($ref)
{
   $product = new ProductResource(Product::where('ref', $ref)->first());

   return Inertia::render('Admin/Products/Show', [
      'product'=> $product 
   ]);
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Tarun Korat