You've already forked Atomcms-edit
1fe8d10c90
- Replace closures in web.php and auth.php with dedicated controllers (LoginRedirectController, LogoutController, TwoFactorChallengeController, EmailVerificationController) to fix route caching issues - Add migration to increase password column to VARCHAR(255) for Argon2id support - Fix 500 error caused by route cache incompatibility with closures
23 lines
467 B
PHP
Executable File
23 lines
467 B
PHP
Executable File
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Controllers\Auth;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\RedirectResponse;
|
|
use Illuminate\Support\Facades\Auth;
|
|
use Illuminate\Support\Facades\Session;
|
|
|
|
class LogoutController extends Controller
|
|
{
|
|
public function __invoke(): RedirectResponse
|
|
{
|
|
Auth::guard('web')->logout();
|
|
Session::invalidate();
|
|
Session::regenerateToken();
|
|
|
|
return redirect('/');
|
|
}
|
|
}
|