sintonia_webapp/app/Livewire/Actions/Logout.php
2024-10-04 15:29:16 +02:00

20 lines
358 B
PHP

<?php
namespace App\Livewire\Actions;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Session;
class Logout
{
/**
* Log the current user out of the application.
*/
public function __invoke(): void
{
Auth::guard('web')->logout();
Session::invalidate();
Session::regenerateToken();
}
}