/
melnik.58
/
cube.example
Обзор
Документация
Войти
/
melnik.58
/
cube.example
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
app/Http/Middleware/Authenticate.php
17 строк
409 B
Мельник Екатерина Викторовна
Установка Laravel
28 янв 2025, 09:29
28 янв 2025, 09:29
bd32bb7
Код
Авторство
О чём код?
<?php namespace App\Http\Middleware; use Illuminate\Auth\Middleware\Authenticate as Middleware; use Illuminate\Http\Request; class Authenticate extends Middleware { /** * Get the path the user should be redirected to when they are not authenticated. */ protected function redirectTo(Request $request): ?string { return $request->expectsJson() ? null : route('login'); } }