/** * Display the specified resource. * * @param Vehicle $vehicle * @return Response */ public function show(Vehicle $vehicle) { $logs = $vehicle->logs()->orderBy('log_date', 'DESC')->get(); return view('vehicles.show', compact('vehicle', 'logs')); }
/** * Display a listing of the resource. * * @return Response */ public function index(Vehicle $vehicle) { $logs = $vehicle->logs()->latest()->get(); return view('vehicles.logs.index', compact('logs')); }