Answers for "auth logout laravel"

PHP
5

get id user login laravel

use Auth;
$user_id = Auth::user()->id;
Posted by: Guest on January-06-2021
0

Auth log out laravel

Auth::logout();
Posted by: Guest on August-11-2020
1

laravel auth

composer require laravel/ui

php artisan ui vue --auth

npm install && npm run dev
Posted by: Guest on December-22-2020
0

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);
}
Posted by: Guest on December-09-2020
4

laravel auth

//namespace
use Illuminate\Support\Facades\Auth;
Posted by: Guest on May-17-2020
-1

laravel 8 make:auth

php artisan migrate
npm install && npm run dev
Posted by: Guest on December-22-2020

Browse Popular Code Answers by Language