Answers for "laravel logout user"

PHP
3

laravel logout

//make a route as a post and button should look like this
 <form action="{{ route('logout') }}" method="post">
       @csrf
       <button type="submit">Logout</button>
</form>
//Controller will be like this.
public function store(){
        auth()->logout();
        return redirect()->route('home');
    }
Posted by: Guest on September-04-2021
0

laravel force user logout

if (!Auth::user()->isActive()) {
    Auth::logout();

    return Redirect::home();
}
Posted by: Guest on October-06-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
-2

laravel 8 make:auth

composer require laravel/ui --dev
php artisan ui vue --auth
Posted by: Guest on December-22-2020
0

laravel logout all users

rm -rf storage/framework/sessions/*
Posted by: Guest on April-07-2020

Browse Popular Code Answers by Language