mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-10-08 05:43:18 +01:00
Updated Laravel to v13
This commit is contained in:
committed by
Constantin Graf
parent
12cc3f27f8
commit
2dadf1ef02
22
app/Http/Middleware/AuthenticateFilamentPanel.php
Normal file
22
app/Http/Middleware/AuthenticateFilamentPanel.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Filament\Http\Middleware\Authenticate as Middleware;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AuthenticateFilamentPanel extends Middleware
|
||||
{
|
||||
/**
|
||||
* The admin panel has no login page of its own (it shares the app's
|
||||
* session-based login), so Filament::getLoginUrl() always returns null.
|
||||
* Fall back to the app's login route so guests are redirected instead
|
||||
* of receiving an empty 401 response.
|
||||
*/
|
||||
protected function redirectTo($request): ?string
|
||||
{
|
||||
return parent::redirectTo($request) ?? ($request->expectsJson() ? null : route('login'));
|
||||
}
|
||||
}
|
||||
19
app/Http/Middleware/PreventRequestForgery.php
Normal file
19
app/Http/Middleware/PreventRequestForgery.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\PreventRequestForgery as Middleware;
|
||||
|
||||
class PreventRequestForgery extends Middleware
|
||||
{
|
||||
/**
|
||||
* The URIs that should be excluded.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
||||
|
||||
class VerifyCsrfToken extends Middleware
|
||||
{
|
||||
/**
|
||||
* The URIs that should be excluded from CSRF verification.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user