container = $container; } /** * Get the session driver. * * The session driver returned will be the driver specified in the session configuration * file. Only one session driver may be active for a given request, so the driver will * be managed as a singleton. * * @param string $driver * @return Session\Driver */ public function driver($driver) { if ($this->container->registered('laravel.session.'.$driver)) { return $this->container->resolve('laravel.session.'.$driver); } throw new \Exception("Session driver [$driver] is not supported."); } }