Ejemplo n.º 1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int      $id
  * @return Response
  */
 public function edit($id)
 {
     if (!($user = $this->user->find($id))) {
         flash()->error(trans('user::messages.user not found'));
         return redirect()->route('admin.user.user.index');
     }
     $roles = $this->role->all();
     $currentUser = $this->auth->check();
     return view('user::admin.users.edit', compact('user', 'roles', 'currentUser'));
 }
Ejemplo n.º 2
0
 /**
  *
  */
 private function emptyUserTables()
 {
     foreach ($this->user->all() as $user) {
         $this->user->delete($user->id);
     }
     foreach ($this->role->all() as $role) {
         $this->role->delete($role->id);
     }
 }
Ejemplo n.º 3
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $this->role->pushCriteria(new RoleOrderCriteria());
     $roles = $this->role->all();
     return view('user::backend.roles.index', compact('roles'));
 }
Ejemplo n.º 4
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $roles = $this->role->all();
     return view('user::admin.roles.index', compact('roles'));
 }