Пример #1
0
 public function index()
 {
     return View::make('vehicle.index')->with('vehicles', Vehicle::all());
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $users = User::all();
     $vehicles = Auth::user()->isClient() ? Vehicle::where('user_id', '=', Auth::id())->get() : Vehicle::all();
     return View::make('dashboard')->with('title', 'Dashboard')->with('vehicles', $vehicles);
 }
 public function get_vehicles(Request $request)
 {
     $reps = Vehicle::all();
     return response()->json(['count' => count($reps), 'data' => $reps]);
 }
Пример #4
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return view('vehicle.list', ['vehicles' => Vehicle::all()]);
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $vehicles = Auth::user()->isClient() ? Vehicle::where('user_id', '=', Auth::id())->get() : Vehicle::all();
     return View::make('vehicles.index')->with('vehicles', $vehicles)->with('title', 'All Vehicles');
 }