Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| HandleInertiaRequests | |
0.00% |
0 / 4 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| version | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| share | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Http\Middleware; |
| 4 | |
| 5 | use Illuminate\Http\Request; |
| 6 | use Inertia\Middleware; |
| 7 | |
| 8 | class HandleInertiaRequests extends Middleware |
| 9 | { |
| 10 | /** |
| 11 | * The root template that's loaded on the first page visit. |
| 12 | * |
| 13 | * @see https://inertiajs.com/server-side-setup#root-template |
| 14 | * |
| 15 | * @var string |
| 16 | */ |
| 17 | protected $rootView = 'app'; |
| 18 | |
| 19 | /** |
| 20 | * Determines the current asset version. |
| 21 | * |
| 22 | * @see https://inertiajs.com/asset-versioning |
| 23 | */ |
| 24 | public function version(Request $request): ?string |
| 25 | { |
| 26 | return parent::version($request); |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Define the props that are shared by default. |
| 31 | * |
| 32 | * @see https://inertiajs.com/shared-data |
| 33 | * |
| 34 | * @return array<string, mixed> |
| 35 | */ |
| 36 | public function share(Request $request): array |
| 37 | { |
| 38 | return array_merge(parent::share($request), [ |
| 39 | // |
| 40 | ]); |
| 41 | } |
| 42 | } |