Example #1
0
 public function connect()
 {
     $password = Input::get('password');
     $username = Input::get('username');
     if (Auth::attempt(['loginClient' => $username, 'password' => $password], true)) {
         $id = (int) Client::getIdByLogin($username);
         return Response::json(['status' => 'OK', 'id' => $id]);
     } else {
         return Response::json(['status' => 'FAIL']);
     }
 }