Skip to content

Instantly share code, notes, and snippets.

@adbrsln
Created November 4, 2018 15:51
Show Gist options
  • Save adbrsln/1845690d77e40b138b7833f5c3fa390f to your computer and use it in GitHub Desktop.
Save adbrsln/1845690d77e40b138b7833f5c3fa390f to your computer and use it in GitHub Desktop.
public function login(Request $request)
{
$credentials = $request->only('username', 'password');
if ( ! $token = JWTAuth::attempt($credentials)) {
return response([
'status' => 'error',
'error' => 'invalid.credentials',
'msg' => 'Invalid Credentials.'
], 400);
}
//send TAC number run sms function
return response([
'status' => 'success',
'token' => $token
]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment