Ejemplo n.º 1
0
 private function getRol($rol)
 {
     return Rol::where('nombre', $rol)->first();
 }
Ejemplo n.º 2
0
 public function getRol()
 {
     return Rol::where('nombre', 'CLIENTE')->first();
 }
 private function getRol()
 {
     return Rol::where('nombre', 'CENTRAL_EMPRESA')->first();
 }
Ejemplo n.º 4
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $rol = Rol::find($id);
     $rol->delete();
     $roles = Rol::paginate();
     $notices = array("Registro Eliminado");
     return \Redirect::route('admin.roles.index')->with('notices', $notices);
 }
Ejemplo n.º 5
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     Log::info('Usuario editar id: ' . $id);
     $user = User::findOrFail($id);
     $roles = Rol::lists('desc_rol', "clave_rol");
     $areas = Area::lists('desc_area', 'clave_area');
     $puestos = Puesto::lists('desc_puesto', 'clave_puesto');
     return view('admin.users.editar', compact('user', 'roles', 'areas', 'puestos'));
 }