get id user login laravel
use Auth;
$user_id = Auth::user()->id;
get id user login laravel
use Auth;
$user_id = Auth::user()->id;
Auth log out laravel
Auth::logout();
laravel auth
composer require laravel/ui
php artisan ui vue --auth
npm install && npm run dev
laravel token logout
public function logout (Request $request) {
$accessToken = auth()->user()->token();
$token= $request->user()->tokens->find($accessToken);
$token->revoke();
return response(['message' => 'You have been successfully logged out.'], 200);
}
laravel 8 make:auth
php artisan migrate
npm install && npm run dev
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