PATH:
home
/
lab2454c
/
costbloc.com
/
app
/
Http
/
Middleware
<?php namespace App\Http\Middleware; use Closure; use Illuminate\Http\Request; use Illuminate\Contracts\Foundation\Application; use Illuminate\Foundation\Http\MaintenanceModeBypassCookie; class CheckForMaintenanceMode { /** * The application implementation. * * @var \Illuminate\Contracts\Foundation\Application */ protected $app; /** * Create a new middleware instance. * * @param \Illuminate\Contracts\Foundation\Application $app * @return void */ public function __construct(Application $app) { $this->app = $app; } public function handle($request, Closure $next) { if ($this->app->isDownForMaintenance()) { $data = json_decode(file_get_contents($this->app->storagePath().'/framework/down'), true); if (isset($data['secret']) && isset($request->bypass_key) && $request->bypass_key === $data['secret']) { return redirect()->back()->withCookie( MaintenanceModeBypassCookie::create($request->bypass_key) ); } } return $next($request); } }
[-] TrustProxies.php
[edit]
[-] CheckForMaintenanceMode.php
[edit]
[-] IsLoggedIn.php
[edit]
[-] TrimStrings.php
[edit]
[+]
..
[-] Permission.php
[edit]
[+]
Api
[-] RedirectIfNotCustomer.php
[edit]
[-] RedirectIfAuthenticated.php
[edit]
[-] Authenticate.php
[edit]
[-] CheckGuest.php
[edit]
[-] UserAuthenticate.php
[edit]
[-] EncryptCookies.php
[edit]
[-] PreventRequestsDuringMaintenance.php
[edit]
[-] Locale.php
[edit]
[-] CheckForDemoMode.php
[edit]
[-] VerifyCsrfToken.php
[edit]
[-] TrustHosts.php
[edit]