Example #1
0
 /**
  * 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'));
 }
Example #2
0
 /**
  * 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'));
 }