$carousel->map(function ($item) { return [ "alt" => $item->alt, "image_url" => $item->image_url ? asset(Storage::url($item->image_url)) : null, ]; }), "testimonial" => $testimonail->map(function ($item) { return [ "name" => $item->name, "location" => $item->location, "image" => $item->image ? asset(Storage::url($item->image)) : null, "description" => $item->description ]; }) ]; return Inertia::render('welcome', ['data' => $response]); } public function product() { $product = Product::all(); $productResponse = $product->map(function ($item) { return [ "id" => $item->id, "title" => $item->title, "type" => $item->type, "image_url" => $item->image_url ? asset(Storage::url($item->image_url)) : null, ]; }); return Inertia::render('product', ['product' => $productResponse]); } public function art() { return Inertia::render('art'); } public function bespoke() { $product = Product::where("type", "bespoke")->get(); $productResponse = $product->map(function ($item) { return [ "id" => $item->id, "title" => $item->title, "type" => $item->type, "image_url" => $item->image_url ? asset(Storage::url($item->image_url)) : null, ]; })->values(); return Inertia::render("bespoke", ["product" => $productResponse]); } public function gallery() { return Inertia::render("gallery"); } public function contact() { return Inertia::render('contact'); } public function faq() { return Inertia::render('faq'); } }