registerRoutes

@param RouteCreator $router
@param string       $prefix

@return  RouteCreator

@since  3.5
@throws \ReflectionException
972558
public function registerRoutes(RouteCreator $router, string $prefix): RouteCreator
    {
        $files = (array) $this->get('routing.files');

        $files['main'] = static::dir() . '/routing.php';

        $router->group($this->getName())
            ->package($this->getName())
            ->prefix($prefix)
            ->register(function (RouteCreator $router) use ($files) {
                foreach ($files as $file) {
                    if (File::getExtension($file) === 'php') {
                        $router->load($file);
                    } else {
                        $this->router->getRouter()
                            ->group($this->getName(), function (MainRouter $router) use ($file) {
                                $router->addRouteFromFile($file, $this);
                            });
                    }
                }
            });

        return $router;
    }
1045745
public function boot(Router $router)
  {
    $router->middleware('roles', \App\Http\Middleware\HasRole::class);
    $router->middleware('admin', \App\Http\Middleware\AdminMiddleware::class);
    if (! $this->app->routesAreCached()) {
      require __DIR__.'/Http/routes.php';
    }

    $configFiles = ['acl'];
    foreach ($configFiles as $config) {
      $this->mergeConfigFrom(__DIR__."/config/{$config}.php", 'acl');
    }

    $this->loadTranslationsFrom(__DIR__ . '/resources/lang', 'acl');
    $this->loadViewsFrom(__DIR__ . '/resources/views', 'acl');

    //Publish middleware
    $this->publishes([
      __DIR__ . '/Middleware/' => app_path('Http/Middleware'),
    ]);

    //Publish providers
    $this->publishes([
      __DIR__ . '/Providers/' => app_path('Providers'),
    ]);

    //Publish views
    $this->publishes([
      // __DIR__.'/resources/views' => resource_path('views/vendor/user-auth'),
      __DIR__.'/resources/views' => resource_path('views'),
    ], 'views');

    //Publish translations
    $this->publishes([
      __DIR__.'/resources/lang/' => resource_path('lang/'),
      // __DIR__.'/resources/lang/pagination.php' => resource_path('lang/pagination.php'),
      // __DIR__.'/resources/lang/password.php' => resource_path('lang/password.php'),
      // __DIR__.'/resources/lang/validation.php' => resource_path('lang/validation.php'),
    ], 'translations');

    // Publish a config file
    $this->publishes([
      __DIR__.'/config/acl.php' => config_path('acl.php'),
    ], 'config');

    //Publish migrations
    $this->publishes([
      __DIR__ . '/database/migrations' => database_path('migrations'),
      __DIR__ . '/database/seeds' => database_path('seeds'),
    ], 'migrations');

    $this->publishes([
      __DIR__.'/assets/bower_components/AdminLTE/' => public_path('/assets/bower_components/AdminLTE/'),
    ], 'public');

    $this->publishes([
      __DIR__ . '/Http/Controllers/Auth/'    => app_path('/Http/Controllers/Auth/'),
      __DIR__ . '/Http/Controllers/Admin/'    => app_path('/Http/Controllers/Admin/'),
    ], 'controllers');
    $this->publishes([
      __DIR__ . '/Models/Admin/' => app_path(),
    ], 'models');
  }
1064041
public function registerRouter($router, ...$params)
    {
        $this->_router->add($router, ...$params);
        if (defined('FOCUS_DEBUG') && FOCUS_DEBUG) {
            $this->getLogger()->debug('add new router: '
                                  .(is_string($router) ? $router : get_class($router)));
        }
    }
533464
public function map(Router $router)
    {
        $router->group(['namespace' => $this->namespace, 'as' => 'core::'], function (Router $router) {
            $path = app_path('Http/Routes');

            $applyAlwaysAuthenticate = $this->app['config']->get('setting.always_authenticate', false);
            $AllFileIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path));
            $PhpFileIterator = new \RegexIterator($AllFileIterator, '/^.+\.php$/i', \RecursiveRegexIterator::GET_MATCH);

            foreach ($PhpFileIterator as $file => $object) {
                $class = substr($file, strlen($path));
                $class = str_replace('/', '\\', $class);
                $class = substr($class, 0, -4);

                $routes = $this->app->make("CachetHQ\\Cachet\\Http\\Routes${class}");

                if ($routes::$browser) {
                    $this->mapForBrowser($router, $routes, $applyAlwaysAuthenticate);
                } else {
                    $this->mapOtherwise($router, $routes, $applyAlwaysAuthenticate);
                }
            }
        });
    }
41057
protected function _prepareRouter($router)
    {
        // Wrap Route That Make it usable for Route Stack Wrapper
        if (!$router instanceof iRouterStack)
            $router = new RouteStackChainWrapper($router);

        $router->setParent($this);


        $routeName = $this->getName().self::SEPARATOR.$router->getName();

        $router->setName($routeName);

        ## check if router name exists
        if (array_key_exists($routeName, $this->_routes_strict_override))
            throw new \RuntimeException(sprintf(
                'Router with name (%s) exists and not Allowed Override.'
                , $routeName
            ));

        return $router;
    }
753385
public function register()
    {
        $this->app->singleton(Router::class);
        $this->app->singleton(RouterInterface::class, Router::class);
        $this->app->bind(RouteActionFactoryInterface::class, function() {
            return new RouteActionFactory();
        });
        $this->app->bind('router', Router::class);
        $this->app->singleton(ThemeRouteCollection::class);
    }
226381
public function boot(Router $router)
    {
        $this->publishes([
            __DIR__ . '/Config/version.php' => config_path('version.php'),
        ], 'version');

        $this->app->singleton('version', function ($app) {
            return new Version($app);
        });
    }
1358677
public function boot(Router $router)
	{
		$configPath = __DIR__.'/../config/theme.php';

		// Publish config.
		$this->publishes([$configPath => config_path('theme.php')], 'config');
	
	    $router->aliasMiddleware('theme', Middleware\ThemeLoader::class);

	    // Register blade directives:
		$this->addToBlade(['dd', 'dd(%s);']);
		$this->addToBlade(['dv', 'dd(get_defined_vars()[%s]);', 'dd(get_defined_vars()["__data"]);']);
		$this->addToBlade(['d', 'dump(%s);']);


		$this->addToBlade(['get', 'Theme::get(%s);']);
		$this->addToBlade(['getIfHas', 'Theme::has(%1$s) ? Theme::get(%1$s) : ""']);

		$this->addToBlade(['partial', 'Theme::partial(%s);']);
		$this->addToBlade(['sections', 'Theme::partial("sections.".%s);']);
		$this->addToBlade(['content', null, 'Theme::content();']);

		$this->addToBlade(['asset', 'Theme::asset()->absUrl(%s);']);

		$this->addToBlade(['protect', 'protectEmail(%s);']);

		$this->addToBlade(['styles', 'Theme::asset()->container(%s)->styles();', 'Theme::asset()->styles();']);
		$this->addToBlade(['scripts', 'Theme::asset()->container(%s)->scripts();', 'Theme::asset()->scripts();']);

		$this->addToBlade(['widget', 'Theme::widget(%s)->render();']);
	}
736552
protected function registerRouteFilters(Router $router) {
		foreach ( ( array ) $this->before as $before ) {
			$router->before ( $before );
		}
		
		foreach ( ( array ) $this->after as $after ) {
			$router->after ( $after );
		}
		
		foreach ( ( array ) $this->filters as $name => $filter ) {
			$router->filter ( $name, $filter );
		}
	}
93967
public function build() : RouterInterface
    {
        $router = $this->router;
        foreach($this->routing_rules as $routing_rule => $events)
        {
            if (is_string($events)){
                try{
                    $router->bind($routing_rule, '*', $events);
                }
                catch(RoutingRuleBindingException $e)
                {
                    throw new RouterBuildingException('Rule binding failed:' . $routing_rule . ' event:' . $events, $e);
                }
            }
            else if (is_array($events)){
                foreach($events as $filter => $event){
                    try{
                        $router->bind($routing_rule, $filter, $event);
                    }
                    catch(RoutingRuleBindingException $e)
                    {
                        throw new RouterBuildingException('Rule binding failed:' . $routing_rule . ' event:' . $event . ' filter:' . $filter, $e);
                    }
                }
            }
        }
        return $router;
    }
318291
public function addCollection($key, RouteCollection $routes, $prefix = null)
    {
        $this->routes[$key] = new RouteCollectionUrlGenerator(
            $this->app->url($prefix),
            $routes
        );

        return $this;
    }
787338
public function group(string $prefix, callable $handler) : RouterInterface {
        $this->setPrefix($prefix);
        $handler($this);
        $this->setPrefix('');
        return $this;
    }
767646
public function setRouter(Symfony\Component\Routing\Router $router)
    {
        $this->router = $router;

        return $this;
    }
1099083
public function setRoutes (Router $router)
    {
        // Filter
        $router->addFilter ('authenticated', array ($this, 'routerVerifier'));

        // Routes
        $router->match ('GET|POST', $this->routepath . '/login/{authenticator}', '\CatLab\Accounts\Controllers\LoginController@authenticator');
        $router->match ('GET', $this->routepath . '/login', '\CatLab\Accounts\Controllers\LoginController@login');
        $router->match ('GET', $this->routepath . '/welcome', '\CatLab\Accounts\Controllers\LoginController@welcome')->filter('authenticated');

        $router->match ('GET|POST', $this->routepath . '/notverified', '\CatLab\Accounts\Controllers\LoginController@requiresVerification');

        $router->match ('GET', $this->routepath . '/logout', '\CatLab\Accounts\Controllers\LoginController@logout');

        $router->match ('GET', $this->routepath . '/cancel', '\CatLab\Accounts\Controllers\LoginController@cancel');

        $router->match ('GET|POST', $this->routepath . '/register/{authenticator}', '\CatLab\Accounts\Controllers\RegistrationController@authenticator');
        $router->match ('GET|POST', $this->routepath . '/register', '\CatLab\Accounts\Controllers\RegistrationController@register');

        $router->get ($this->routepath . '/verify/{id}', '\CatLab\Accounts\Controllers\LoginController@verify');
    }
128147
public function setRouter(Router $router) {
        $this->set('router', $router);

        $this->_router = $this->get('router');

        return $this;
    }
296818
public function boot(Router $router)
    {
        Schema::defaultStringLength(191);
        $router->group(
            [
                'prefix' => null,
                'namespace' => 'Tyondo\\Notifications\\Controllers',
            ], function(){
            $this->loadRoutesFrom(__DIR__.'/Routes/web.php');
        }
        );


        // Merge config files
        $this->mergeConfigFrom(__DIR__.'/Config/tyondo_notifications.php', $this->packageName);
		// Register Views
        //$this->loadViewsFrom(__DIR__.'/views', $this->packageName);


    }
276043
protected function loadRoutes(Router $router): void
    {
        foreach ($this->getRoutes() as $route) {
            $router->namespace($this->namespace)
                ->group($route);
        }
    }