/**
  * Handle an incoming request.
  *
  * @param \Illuminate\Http\Request $request
  * @param \Closure                 $next
  *
  * @throws \Symfony\Component\HttpKernel\Exception\HttpException
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if ($this->application->isDownForMaintenance()) {
         $data = json_decode(file_get_contents($this->application->storagePath() . '/bootstraps/down'), true);
         throw new MaintenanceModeException($data['time'], $data['retry'], $data['message']);
     }
     return $next($request);
 }
Beispiel #2
0
 /**
  * @return array
  */
 protected function loadIlluminateConfiguration()
 {
     return ['app' => ['debug' => true, 'url' => 'http://localhost', 'timezone' => 'UTC+8', 'locale' => 'en', 'fallback_locale' => 'en', 'key' => 'GERojpSdTnQQbr77s5iXIa1c7Ne7NO4d', 'cipher' => 'AES-256-CBC', 'log' => 'daily'], 'auth' => ['driver' => 'eloquent', 'model' => User::class, 'table' => 'users', 'password' => ['email' => 'admin::emails.password', 'table' => 'password_resets', 'expire' => 60]], 'cache' => ['default' => 'file', 'stores' => ['file' => ['driver' => 'file', 'path' => $this->application->storagePath() . '/framework/cache']], 'prefix' => 'flarum'], 'filesystems' => ['default' => 'local', 'cloud' => 's3', 'disks' => []], 'mail' => ['driver' => 'mail'], 'session' => ['driver' => 'file', 'lifetime' => 120, 'expire_on_close' => false, 'encrypt' => false, 'files' => $this->application->storagePath() . '/framework/sessions', 'connection' => null, 'table' => 'sessions', 'lottery' => [2, 100], 'cookie' => 'notadd_session', 'path' => '/', 'domain' => null, 'secure' => false], 'view' => ['paths' => [], 'compiled' => $this->application->storagePath() . '/framework/views']];
 }