laravel 6 tymon/jwt-auth
composer require tymon/jwt-auth
laravel 6 tymon/jwt-auth
composer require tymon/jwt-auth
jwt laravel
php artisan jwt:secret
laravel jwt
'providers' => [
...
Tymon\JWTAuth\Providers\LaravelServiceProvider::class,
]
jwt laravel
php artisan jwt:secret
laravel jwt token
$ composer require tymon/jwt-auth:dev-develop --prefer-source
laravel jwt token
protected function registered(Request $request, User $user)
{
if (!$token = auth()->attempt($request->only(['email', 'password']))) {
return abort(401);
};
return (new UserResource($request->user()))->additional([
'meta' => [
'token' as $token
],
]);
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us