예제 #1
0
 /**
  * Load the "routes" file for a given bundle.
  *
  * @param  string  $bundle
  * @return void
  */
 public static function routes($bundle)
 {
     if (static::routed($bundle)) {
         return;
     }
     $path = static::path($bundle) . 'routes' . EXT;
     // By setting the bundle property on the router the router knows what
     // value to replace the (:bundle) place-holder with when the bundle
     // routes are added, keeping the routes flexible.
     Router::$bundle = static::option($bundle, 'handles');
     if (!static::routed($bundle) and file_exists($path)) {
         static::$routed[] = $bundle;
         require $path;
     }
 }
예제 #2
0
 public static function routes($bundle)
 {
     if (static::routed($bundle)) {
         return;
     }
     $path = static::path($bundle) . 'routes' . EXT;
     Router::$bundle = static::option($bundle, 'handles');
     if (!static::routed($bundle) and file_exists($path)) {
         static::$routed[] = $bundle;
         require $path;
     }
 }