Set the active session store.
public setSession ( Illuminate\Session\Store $session ) : void | ||
$session | Illuminate\Session\Store | |
return | void |
protected function registerRedirector() { $this->app['redirect'] = $this->app->share(function ($app) { $redirector = new Redirector($app['url']); if (isset($app['session.store']) === true) { $redirector->setSession($app['session.store']); } return $redirector; }); }
/** * Register the Redirector service. * * @return void */ protected function registerRedirector() { $this->app['redirect'] = $this->app->share(function ($app) { $redirector = new Redirector($app['url']); // If the session is set on the application instance, we'll inject it into // the redirector instance. This allows the redirect responses to allow // for the quite convenient "with" methods that flash to the session. if (isset($app['session.store'])) { $redirector->setSession($app['session.store']); } return $redirector; }); }
/** * Set the active session store. * * @param \Illuminate\Session\Store $session * @return void * @static */ public static function setSession($session) { \Illuminate\Routing\Redirector::setSession($session); }