Esempio n. 1
0
 public function delete($id)
 {
     try {
         UserModel::find($id)->delete();
         $alert['msg'] = 'User has been deleted successfully';
         $alert['type'] = 'success';
     } catch (\Exception $ex) {
         $alert['msg'] = 'This User has been already used';
         $alert['type'] = 'danger';
     }
     return Redirect::route('admin.user')->with('alert', $alert);
 }
Esempio n. 2
0
 public function postVKLogin()
 {
     if (Request::ajax()) {
         $credentials = ['username' => Input::get('FirstName'), 'password' => 'vkPassword'];
         $vkid = Input::get('uid');
         \User::vkUserUpsert($vkid, $credentials['username']);
         if (Auth::attempt($credentials)) {
             return trans('messages.SLI');
         }
         //return Redirect::to('/');
         return trans('messages.FTL');
     }
 }