View Code? Open in Web Editor
NEW
Laravel 8 JWT Authentication example
Home Page: https://www.positronx.io/laravel-jwt-authentication-tutorial-user-login-signup-api/
Shell 0.70%
PHP 83.21%
Blade 16.09%
laravel-jwt-auth's Introduction
laravel-jwt-auth's People
laravel-jwt-auth's Issues
AuthController.php showing 2 errors
-
public function refresh() {
return $this->createNewToken(auth()->refresh()); // error 1
}
-
protected function createNewToken($token){
return response()->json([
'access_token' => $token,
'token_type' => 'bearer',
'expires_in' => auth()->factory()->getTTL() * 60, // error 2
'user' => auth()->user()
]);
}
The methods are Undefined.
How can i fix it?
Thanks