Mount the collection to the micro app router.

@return void
14688
public function mount(): void
    {
        if (count($this->collections) > 0) {
            foreach ($this->collections as $collection) {
                $micro = new MicroCollection();
                // Set the main handler. ie. a controller instance
                $micro->setHandler($collection['className'], true);
                // Set a common prefix for all routes

                if ($this->prefix) {
                    $micro->setPrefix($this->prefix);
                }

                // Use the method 'index' in PostsController
                $micro->{$collection['method']}($collection['pattern'], $collection['function']);

                $this->application->mount($micro);
            }
        }

        return;
    }
633287
public function boot(Application $app)
    {
        $paths = $app['lazy.thumbnail.mount_paths'];
        foreach ($paths as $route => $data) {
            $realRoute = isset($data['route']) ? $data['route'] : $route;
            $app->mount($realRoute, $this->connect($app, $realRoute, $data));
        }
    }
1214237
private function mapAdminRoutes()
    {
        $this->name('backups.')
            ->prefix($this->config()->get('arcanesoft.backups.route.prefix', 'backups'))
            ->group(function () {
                Routes\StatusesRoutes::register();
            });
    }
439384
public function bootstrap()
    {
        $this->router = $this->app['router'];
        $this->middlewareGroups = array_merge([], $this->middlewareGroups, config('routing.middlewareGroups', []));
        $this->routeMiddleware = array_merge([], $this->routeMiddleware, config('routing.routeMiddleware', []));

        foreach ($this->middlewareGroups as $key => $middleware) {
            $this->router->middlewareGroup($key, $middleware);
        }

        foreach ($this->routeMiddleware as $key => $middleware) {
            $this->router->middleware($key, $middleware);
        }
    }
167300
private function runView(): void
    {
        $action = ($this->routeAction) ? $this->routeAction : 'index';

        \call_user_func([$this->view, $action]);
    }
910608
public function boot()
    {
    	if (config('smsir.panel-routes', true)) {
            // the main router
            include_once __DIR__.'/routes.php';
        }
	    // the main views folder
	    $this->loadViewsFrom(__DIR__.'/views', 'smsir');
	    // the main migration folder for create smsir tables

	    // for publish the views into main app
	    $this->publishes([
		    __DIR__.'/views' => resource_path('views/vendor/smsir'),
	    ]);

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

	    // for publish the assets files into main app
	    $this->publishes([
		    __DIR__.'/assets' => public_path('vendor/smsir'),
	    ], 'public');

	    // for publish the smsir config file to the main app config folder
	    $this->publishes([
		    __DIR__.'/config/smsir.php' => config_path('smsir.php'),
	    ]);
    }
814799
protected function setupMiddleware() {
        $this->middleware('antares.auth');
        $this->middleware('antares.manage');
        $this->middleware('antares.csrf');

        $this->canMiddleware('install');
        $this->canMiddleware('uninstall');
        $this->canMiddleware('activate');
        $this->canMiddleware('deactivate');
    }
510567
protected static function registerRoutes()
    {
        parent::routes(function ($router) {
            /* @var \Illuminate\Routing\Router $router */
            $router->get('backup', 'Encore\Admin\Backup\BackupController@index')->name('backup-list');
            $router->get('backup/download', 'Encore\Admin\Backup\BackupController@download')->name('backup-download');
            $router->post('backup/run', 'Encore\Admin\Backup\BackupController@run')->name('backup-run');
            $router->delete('backup/delete', 'Encore\Admin\Backup\BackupController@delete')->name('backup-delete');
        });
    }
1250523
public function routeHttp()
    {
        if ($this->config->isInitialized() || $this->url->isInstall()) {
            $this->route->process();
        } else {
            $this->url->redirect('install');
        }
    }
1202785
function mount(router) {
  var r = arguments[1] || routes;
  var pre = arguments[2] || '';
  
  for (var k in r) {
    var file = '/' + pre + '' + k + '.js';
    debug('mount route ' + file + " ");
    var path = '';
    
    debug(k)
    debug(r[k])
    
    if (k === 'apie.js' || k === 'app.js'|| k === 'package.json') {
      return
    }

    if (typeof r[k] == 'object' && !(r[k]['body'] || r[k]['res']) ){
      // console.log('this is a obj');
      mount(router, r[k], pre + k + '/');
    } else if(k === 'index') {
      path = '/'+ pre;
      _use(router, file, path, r[k]);
    } else {
      path = '/' + pre + '' + k;
      _use(router, file, path, r[k]);
    }
  }
}
2921
public function build()
    {
        $routeCollection = new RouteCollection();

        foreach ($this->routes as $name => $route) {
            if ($route instanceof Route) {
                $route->setDefaults(array_merge($this->defaults, $route->getDefaults()));
                $route->setOptions(array_merge($this->options, $route->getOptions()));

                foreach ($this->requirements as $key => $val) {
                    if (!$route->hasRequirement($key)) {
                        $route->setRequirement($key, $val);
                    }
                }

                if (null !== $this->prefix) {
                    $route->setPath('/'.$this->prefix.$route->getPath());
                }

                if (!$route->getHost()) {
                    $route->setHost($this->host);
                }

                if (!$route->getCondition()) {
                    $route->setCondition($this->condition);
                }

                if (!$route->getSchemes()) {
                    $route->setSchemes($this->schemes);
                }

                if (!$route->getMethods()) {
                    $route->setMethods($this->methods);
                }

                // auto-generate the route name if it's been marked
                if ('_unnamed_route_' === substr($name, 0, 15)) {
                    $name = $this->generateRouteName($route);
                }

                $routeCollection->add($name, $route);
            } else {
                /* @var self $route */
                $subCollection = $route->build();
                $subCollection->addPrefix($this->prefix);

                $routeCollection->addCollection($subCollection);
            }
        }

        foreach ($this->resources as $resource) {
            $routeCollection->addResource($resource);
        }

        return $routeCollection;
    }
1121379
public function run()
    {
        if (!(bool)$this->ready) {
            $this->init();
        }

        $this->configureCustomPostType();
        $this->addAppRoutes();
        $this->improveSecurity();

        $this->displayRuntimeHeader();
        $this->loadMiddleware();
    }
800923
protected function loadRoutes(): RouteCollection
    {
        $builder = $this->getRouteCollectionBuilder();

        if (\is_callable($this->routeCallback)) {
            call_user_func($this->routeCallback, $builder);
        }

        return $builder->build();
    }
783859
public function postPersist()
    {
        if ($this->lifecycleEventsActive) {
            $collection = $this->resourceManager->getCollection($this->collectionName);
            $collection->getTarget()->publishResource($this, $collection);
        }
    }
246539
private static function router()
    {
        $files = ['Url'];
        $folder = static::$root.'Router'.'/';

        self::call($files, $folder);

        //New router surface

        $files = ['Route', 'Routes'];
        $folder = static::$root.'Http/Router'.'/';

        self::call($files, $folder);

        $files = ['RouteDuplicatedException', 'RouteMiddlewareNotFoundException', 'RouteNotFoundInRoutesRegisterException', 'NotFoundHttpException'];
        $folder = static::$root.'Http/Router/Exceptions'.'/';

        self::call($files, $folder);
    }
30170
private static function loadRoutes()
    {
        // Media Manager Routes
        Route::group(['prefix' => config('media-manager.routes.prefix')], function () {
            Route::get('browser/index', '\TalvBansal\MediaManager\Http\Controllers\MediaController@ls');

            Route::post('browser/file', '\TalvBansal\MediaManager\Http\Controllers\MediaController@uploadFiles');
            Route::delete('browser/file', '\TalvBansal\MediaManager\Http\Controllers\MediaController@deleteFile');
            Route::post('browser/folder', '\TalvBansal\MediaManager\Http\Controllers\MediaController@createFolder');
            Route::delete('browser/folder', '\TalvBansal\MediaManager\Http\Controllers\MediaController@deleteFolder');

            Route::post('browser/rename', '\TalvBansal\MediaManager\Http\Controllers\MediaController@rename');
            Route::get('browser/directories', '\TalvBansal\MediaManager\Http\Controllers\MediaController@allDirectories');
            Route::post('browser/move', '\TalvBansal\MediaManager\Http\Controllers\MediaController@move');
        });
    }
365843
protected function mapWebRoutes(): void
    {
        $file = $this->basePath.'routes/web.php';

        if (file_exists($file)) {
            $this->loadRoutesFrom(
                Route::middleware('web')
                ->group($file));
        }
    }