{{ $page['kicker'] }}
{!! $page['title'] !!}
{{ $page['description'] }}
@if ($return){{ $return }}
Check the latest update before trying again.@else{!! $page['detail'] !!}@endif
{{-- One technical page (404, 500, maintenance, offline, link expired...): config/error_pages.php holds each state's words.
No database, and only its own assets (css/technical-pages.css, js/technical-pages.js, images/likely-sports-logo.svg): it renders while the app or database is down. $static: written to public/errors (no request behind it). --}}
@php
$page = config('error_pages.states.' . $state);
$links = config('error_pages.links');
$static ??= false;
// Site paths: asset()/url() on a request; root-relative in the static copies (written from the CLI, served on any host).
$url = fn (string $path = '') => $static ? '/' . ltrim($path, '/') : url($path);
$asset = fn (string $path) => ($static ? '/' . $path : asset($path)) . '?v=' . assetVersion($path);
$link = fn (?string $href) => $href && ! preg_match('#^[a-z]+:#i', $href) ? $url($href) : $href;
$retryUrl = $static ? null : (request()->isMethod('GET') ? request()->fullUrl() : url()->previous());
$back = $static ? $url() : url()->previous();
$back = str_starts_with($back, url('/')) ? $back : $url();
$signin = $back . (str_contains($back, '?') ? '&' : '?') . 'login=1';
$retryAfter = isset($exception) && method_exists($exception, 'getHeaders') ? ($exception->getHeaders()['Retry-After'] ?? null) : null;
$retryAfter = is_numeric($retryAfter) ? (int) $retryAfter : ($retryAfter ? max(1, strtotime($retryAfter) - time()) : 60);
$return = $state === '503' ? config('error_pages.maintenance_return') : null;
$arrow = '';
$retryIcon = '';
$icons = [
'maintenance' => '
{{ $page['kicker'] }}
{{ $page['description'] }}
@if ($return){{ $return }}
Check the latest update before trying again.@else{!! $page['detail'] !!}@endif