示例#1
0
 public function destroy($id)
 {
     if ($id == 'me') {
         $id = \Auth::user()->id;
     }
     \UserDriver::delete($id);
     return \Redirect::route('admin.users.index');
 }
示例#2
0
 public function updatePassword()
 {
     $id = \UserDriver::loggedIn()->id;
     $data = \Input::all();
     try {
         $user = \UserDriver::changePassword($id, $data['old'], $data['new'], $data['confirm']);
     } catch (\Exception $e) {
         return \Redirect::route('me.settings.edit')->withErrors(['error' => $e->getMessage()])->withInput();
     }
     return \Redirect::route('me.index');
 }
示例#3
0
 public function index()
 {
     $user = \UserDriver::loggedIn();
     $this->layout->title = trans('me.Dashboard');
     $this->layout->content = \View::make('me.dashboard.index', compact('user'));
 }