/
alexey92
/
test
Обзор
Документация
Войти
/
alexey92
/
test
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
app/Http/Middleware/HandleInertiaRequests.php
39 строк
784 B
alexeylavrentev
new test
07 ноя 2024, 14:33
07 ноя 2024, 14:33
8de66b9
Код
Авторство
О чём код?
<?php namespace App\Http\Middleware; use Illuminate\Http\Request; use Inertia\Middleware; class HandleInertiaRequests extends Middleware { /** * The root template that is loaded on the first page visit. * * @var string */ protected $rootView = 'app'; /** * Determine the current asset version. */ public function version(Request $request): string|null { return parent::version($request); } /** * Define the props that are shared by default. * * @return array<string, mixed> */ public function share(Request $request): array { return [ ...parent::share($request), 'auth' => [ 'user' => $request->user(), ], ]; } }