コード例 #1
0
 /**
  * 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();
     }
 }
コード例 #2
0
 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('/');
 }
コード例 #3
0
ファイル: Utility.php プロジェクト: hrenos/spreadit
 public static function enableRoute($match)
 {
     return Request::is($match) || App::runningUnitTests();
 }