Created
November 4, 2018 15:51
-
-
Save adbrsln/1845690d77e40b138b7833f5c3fa390f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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