Set Router and Request instance into Container

@param $router
@param $request
505894
public function setRouter($request)
    {
        $this->container->set('request', $request);
        $this->container->make(\Cygnite\Router\Router::class);
        $this->container->get('router')->setRequest($request);
        $this->router = $this->container->get('router');
    }
1322385
public function bind(Router $router)
    {
        $router->model('component', 'CachetHQ\Cachet\Models\Component');
        $router->model('component_group', 'CachetHQ\Cachet\Models\ComponentGroup');
        $router->model('incident', 'CachetHQ\Cachet\Models\Incident');
        $router->model('incident_template', 'CachetHQ\Cachet\Models\IncidentTemplate');
        $router->model('incident_update', 'CachetHQ\Cachet\Models\IncidentUpdate');
        $router->model('metric', 'CachetHQ\Cachet\Models\Metric');
        $router->model('metric_point', 'CachetHQ\Cachet\Models\MetricPoint');
        $router->model('schedule', 'CachetHQ\Cachet\Models\Schedule');
        $router->model('setting', 'CachetHQ\Cachet\Models\Setting');
        $router->model('subscriber', 'CachetHQ\Cachet\Models\Subscriber');
        $router->model('subscription', 'CachetHQ\Cachet\Models\Subscription');
        $router->model('tag', 'CachetHQ\Cachet\Models\Tag');
        $router->model('user', 'CachetHQ\Cachet\Models\User');
    }
94999
protected function populateContent(Route $route, Request $request)
    {
        $content = $route->getContent();
        $name    = $content;

        if ($route->isList()) {
            $name .= 's';
            $value = $this->repository->getContents($content, $route->getIndexBy(), $route->getOrder());

            if ($route->isPaginated()) {
                $paginator = new Paginator($value, $route->getPerPage());
                $value     = $paginator->get($request->attributes->get('page'));
                $request->attributes->set('paginator', $paginator);
            }
        } else {
            $value = $this->repository->getContent($content, $request->attributes->get($content));
        }

        $request->attributes->set($name, $value);
    }
1110588
public function addRouter(RouterInterface $router)
    {
        $this->router[] = $router;
        $router->setContext($this->context);
    }
495702
public function mapApiRoutes(Router $router)
    {
        foreach ($this->modules as $module) {
            $module->mapApiRoutes($router);
        }
    }
142963
private function addHeaders(Request $request, Route $route, $headers)
    {
        // set the proper domain
        if ($route->getDomain()) {
            $request->headers->add([
                'HOST' => $route->getDomain(),
            ]);
            $request->server->add([
                'HTTP_HOST' => $route->getDomain(),
                'SERVER_NAME' => $route->getDomain(),
            ]);
        }

        $headers = collect($headers);

        if (($headers->get('Accept') ?: $headers->get('accept')) === 'application/json') {
            $request->setRequestFormat('json');
        }

        return $request;
    }
1352717
public function callRouteAfter($route, $request, $response)
	{
		foreach ($route->afterFilters() as $filter => $parameters)
		{
			$this->callRouteFilter($filter, $parameters, $route, $request, $response);
		}
	}
1081395
public function setRequest(Request $request)
    {
        $this->request = $request;

        $this->cachedRoot = null;
        $this->cachedScheme = null;
        $this->routeGenerator = null;
    }
512550
protected function setupRouter(Request $request)
    {
        if ($request instanceof Request\Web) {
            $router = $this->getRouter();
            if (
                $router instanceof Router\RouterCuInterface
                && $router->isRequestedUrlClean($request))
            {
                $router->enableCleanUrls();
            }
        }

        return $this;
    }
1321751
protected function buildRoutesForAuth(Router $router)
    {
        $auth = $this->core->auth();

        $router->group(
            [
                'prefix' => 'auth',
            ],
            function (Router $router) use ($auth) {

                $router->get('login',  $auth->getRouteLoginAction());
                $router->post('login', $auth->getRouteLoginPostAction());
                $router->get('logout', $auth->getRouteLogoutAction());

                $router->get('password/email',          $auth->getRoutePasswordEmailGetAction());
                $router->post('password/email',         $auth->getRoutePasswordEmailPostAction());
                $router->get('password/reset/{token?}', $auth->getRoutePasswordResetGetAction());
                $router->post('password/reset',         $auth->getRoutePasswordResetPostAction());
            }
        );
    }
796162
public function mapWebRoutes(Router $router)
    {
        $router->group(
            [
                'prefix' => $this->getRoutePrefix(),
                'as'     => $this->getRouteNamePrefix(),
            ],
            function (Router $router) {

                $controller = $this->getModelWebController();

                $router->post('references', [
                    'as'   => 'references',
                    'uses' => $controller . '@references',
                ]);
            }
        );
    }
123147
public function boot(Router $router)
    {
        $this->loadViewsFrom(__DIR__ . '/views', 'initialize');

        $this->publishes([
            __DIR__.'/config/wangeditor.php' => config_path('wangeditor.php'),
        ], 'config');

        $this->publishes([
            __DIR__ . '/assets/wangeditor' => public_path('vendor/wangeditor'),
        ], 'assets');

        $this->publishes([
            __DIR__ . '/views' => base_path('resources/views/vendor/wangeditor')
        ], 'resources');

        if (!app()->runningInConsole()) {
            $this->registerRoute($router);
        }
    }
468775
public function boot(Router $router)
    {
        /** @var Application $app */
        $app = $this->app;

        $this->commands($this->commands);

        if (!$app->routesAreCached()) {
            $this->loadRoutes($router);
        }

        $this->loadMigrations();

        $this->loadTranslations();

        $this->registerPublishes();
    }
235683
public function boot(Router $router): void
    {
        // Load resources
        $this->loadRoutes($router);
        ! $this->app->runningInConsole() || $this->loadMigrationsFrom(__DIR__.'/../../database/migrations');

        // Publish Resources
        ! $this->app->runningInConsole() || $this->publishResources();
    }
905261
public function map(Router $router)
    {
        $api = app('Dingo\Api\Routing\Router');

        $this->loadApiRoutes($api, $router);

        $router->group(['namespace' => $this->namespace], function (Router $router) {
            $this->loadBackendRoutes($router);
            $this->loadFrontendRoutes($router);
        });
    }
923903
public function getRouting(Request $request)
    {
        // Check if router class has been defined in config parameters
        if ($this->getConfig()->hasParameter('routing')) {
            $routerClass = $this->getConfig()->getParameter('routing');

            $router = new $routerClass();

            return $router;
        }

        $router = new Router($request);

        return $router;
    }
1328764
protected function buildRoutesForAuth(Router $router)
    {
        $auth = $this->core->auth();

        $router->group(
            [
                'prefix' => 'auth',
            ],
            function (Router $router) use ($auth) {

                $router->{$this->getLoginMethod()}($this->getLoginPath(), $auth->getApiRouteLoginAction());
                $router->{$this->getLogoutMethod()}($this->getLogoutPath(), $auth->getApiRouteLogoutAction());
            }
        );
    }