Exemplo n.º 1
0
 /**
  * Boot stuff for Frontend
  *
  * @return void
  */
 public function bootFrontend()
 {
     // Check for running in console or backend before route matching
     $rulesPath = storage_path('app/redirects.csv');
     if (!file_exists($rulesPath) || !is_readable($rulesPath)) {
         return;
     }
     $requestUri = str_replace(Request::getBasePath(), '', Request::getRequestUri());
     $manager = RedirectManager::createWithRulesPath($rulesPath);
     $rule = $manager->match($requestUri);
     if ($rule) {
         $manager->redirectWithRule($rule);
     }
 }