headers->set('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0'); $response->headers->set('Pragma', 'no-cache'); $response->headers->set('Expires', 'Sat, 01 Jan 2000 00:00:00 GMT'); return $response; } /** * Determines the current asset version. * * @see https://inertiajs.com/asset-versioning */ public function version(Request $request): ?string { return parent::version($request); } /** * Define the props that are shared by default. * * @see https://inertiajs.com/shared-data * * @return array */ public function share(Request $request): array { [$message, $author] = str(Inspiring::quotes()->random())->explode('-'); return [ ...parent::share($request), 'name' => config('app.name'), 'quote' => ['message' => trim($message), 'author' => trim($author)], 'auth' => [ 'user' => $request->user(), ], 'sidebarOpen' => ! $request->hasCookie('sidebar_state') || $request->cookie('sidebar_state') === 'true', ]; } }