/** * Bootstrap the application events. * * @return void */ public function boot() { \App::make('router')->middleware('artificer-installed', InstalledMiddleware::class); // Avoid redirection when using CLI if (\App::runningInConsole() || \App::runningUnitTests()) { return true; } if (!self::isInstalling() && !self::isInstalled()) { $this->goToInstall(); } }
public function getUsageInfo() { $group = \Request::get("group"); $reset = \Request::get("reset-usage-info"); $show = \Request::get("show-usage-info"); // need to store this so that it can be displayed again \Cookie::queue($this->cookieName(self::COOKIE_SHOW_USAGE), $show, 60 * 24 * 365 * 1); if ($reset) { // TODO: add show usage info to view variables so that a class can be added to keys that have no usage info // need to clear the usage information $this->manager->clearUsageCache(true, $group); } if (\App::runningUnitTests()) { return \Redirect::to('/'); } return !is_null(\Request::header('referer')) ? \Redirect::back() : \Redirect::to('/'); }
public static function enableRoute($match) { return Request::is($match) || App::runningUnitTests(); }