Files
OrderCheck/app/Http/Middleware/HandleInertiaRequests.php
T
mrKamooandClaude Sonnet 4.6 648749a69a feat: replace logo with app name in navigation bar
Display APP_NAME from config instead of the ApplicationLogo SVG.
App name shared globally via Inertia HandleInertiaRequests middleware.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 16:41:55 +02:00

45 lines
1011 B
PHP

<?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
{
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(),
],
'flash' => [
'success' => fn () => $request->session()->get('success'),
'error' => fn () => $request->session()->get('error'),
],
'appName' => config('app.name'),
];
}
}