/**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $almacenes = Local::orderBy('id', 'ASC')->where('type', 'almacen')->paginate(10);
     return view('admin.almacenes.index', ['almacenes' => $almacenes]);
 }
Пример #2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $user = User::find($id);
     $talleres = Local::orderBy('nombre', 'DESC')->where('type', 'taller')->lists('nombre', 'id');
     $my_taller = $user->locales->lists('id')->ToArray();
     $almacenes = Local::orderBy('nombre', 'DESC')->where('type', 'almacen')->lists('nombre', 'id');
     $my_almacen = $user->locales->lists('id')->ToArray();
     return view('admin.users.edit', ['user' => $user, 'talleres' => $talleres, 'almacenes' => $almacenes, 'my_taller' => $my_taller, 'my_almacen' => $my_almacen]);
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $talleres = Local::orderBy('id', 'ASC')->where('type', 'taller')->paginate(10);
     return view('admin.talleres.index', ['talleres' => $talleres]);
 }