route('vehicles.index'); } /** * Display the specified resource. */ public function show(Vehicle $vehicle) { // Load relationships for the show page $vehicle->load(['customer', 'serviceOrders.assignedTechnician', 'appointments', 'inspections']); return view('vehicles.show', compact('vehicle')); } /** * Show the form for editing the specified resource. */ public function edit(Vehicle $vehicle) { return view('vehicles.edit', compact('vehicle')); } /** * Update the specified resource in storage. */ public function update(Request $request, Vehicle $vehicle) { // This is handled by the Livewire component return redirect()->route('vehicles.show', $vehicle); } /** * Remove the specified resource from storage. */ public function destroy(Vehicle $vehicle) { $vehicle->delete(); return redirect()->route('vehicles.index')->with('success', 'Vehicle deleted successfully.'); } }