コード例 #1
0
ファイル: UserController.php プロジェクト: TimLeytens/User
 /**
  * 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'));
 }
コード例 #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);
     }
 }
コード例 #3
0
ファイル: RolesController.php プロジェクト: SocietyCMS/User
 /**
  * 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'));
 }
コード例 #4
0
ファイル: RolesController.php プロジェクト: Houbsi/User
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $roles = $this->role->all();
     return view('user::admin.roles.index', compact('roles'));
 }