PATH:
home
/
lab2454c
/
tripvare.com
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Foundation
/
Console
/
stubs
<?php // Check if the application is in maintenance mode... if (! file_exists($down = __DIR__.'/down')) { return; } // Decode the "down" file's JSON... $data = json_decode(file_get_contents($down), true); // Allow framework to handle request if no prerendered template... if (! isset($data['template'])) { return; } // Allow framework to handle request if request URI is in the exclude list... if (isset($data['except'])) { $uri = parse_url($_SERVER['REQUEST_URI'])['path']; $uri = rawurldecode($uri !== '/' ? trim($uri, '/') : $uri); foreach ((array) $data['except'] as $except) { $except = $except !== '/' ? trim($except, '/') : $except; if ($except == $uri) { return; } $except = preg_quote($except, '#'); $except = str_replace('\*', '.*', $except); if (preg_match('#^'.$except.'\z#u', $uri) === 1) { return; } } } // Allow framework to handle maintenance mode bypass route... if (isset($data['secret']) && $_SERVER['REQUEST_URI'] === '/'.$data['secret']) { return; } // Determine if maintenance mode bypass cookie is valid... if (isset($_COOKIE['laravel_maintenance']) && isset($data['secret'])) { $payload = json_decode(base64_decode($_COOKIE['laravel_maintenance']), true); if (is_array($payload) && is_numeric($payload['expires_at'] ?? null) && isset($payload['mac']) && hash_equals(hash_hmac('SHA256', $payload['expires_at'], $data['secret']), $payload['mac']) && (int) $payload['expires_at'] >= time()) { return; } } // Redirect to the proper path if necessary... if (isset($data['redirect']) && $_SERVER['REQUEST_URI'] !== $data['redirect']) { http_response_code(302); header('Location: '.$data['redirect']); exit; } // Output the prerendered template... http_response_code($data['status'] ?? 503); if (isset($data['retry'])) { header('Retry-After: '.$data['retry']); } echo $data['template']; exit;
[-] routes.stub
[edit]
[-] model.stub
[edit]
[-] model.pivot.stub
[edit]
[-] channel.stub
[edit]
[-] mail.stub
[edit]
[+]
..
[-] notification.stub
[edit]
[-] event.stub
[edit]
[-] listener-duck.stub
[edit]
[-] listener-queued-duck.stub
[edit]
[-] observer.stub
[edit]
[-] markdown-mail.stub
[edit]
[-] cast.stub
[edit]
[-] exception-report.stub
[edit]
[-] policy.stub
[edit]
[-] exception-render-report.stub
[edit]
[-] test.unit.stub
[edit]
[-] exception-render.stub
[edit]
[-] console.stub
[edit]
[-] test.stub
[edit]
[-] view-component.stub
[edit]
[-] policy.plain.stub
[edit]
[-] request.stub
[edit]
[-] observer.plain.stub
[edit]
[-] resource-collection.stub
[edit]
[-] markdown-notification.stub
[edit]
[-] maintenance-mode.stub
[edit]
[-] listener.stub
[edit]
[-] exception.stub
[edit]
[-] job.stub
[edit]
[-] job.queued.stub
[edit]
[-] rule.stub
[edit]
[-] markdown.stub
[edit]
[-] provider.stub
[edit]
[-] resource.stub
[edit]
[-] listener-queued.stub
[edit]