Код: Выделить всё
// api.php
Route::withoutMiddleware([AuthMiddleware::class])->group(function () {
Route::get('/auth/check', [AuthController::class, 'checkUserAuthentication']);
});
Код: Выделить всё
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__ . '/../routes/web.php',
api: __DIR__ . '/../routes/api.php',
commands: __DIR__ . '/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
$middleware->alias([
'sso' => AuthMiddleware::class,
]);
$middleware->use([
AuthMiddleware::class,
]);
})
->withExceptions(function (Exceptions $exceptions) {
//
})->create();
Я не понимаю, почему.
p>
РЕДАКТИРОВАТЬ: похоже, что Laravel не предоставляет эту функциональность https://github.com/laravel/framework/pu ... -614808543
Подробнее здесь: https://stackoverflow.com/questions/793 ... ot-working
Мобильная версия