StartSession
class StartSession (View source)
Properties
protected SessionManager | $manager | The session manager. |
|
protected callable|null | $cacheFactoryResolver | The callback that can resolve an instance of the cache factory. |
Methods
Create a new session middleware.
Handle the given request within session state.
Handle the given request within session state.
Determine if the configuration odds hit the lottery.
Store the current URL for the request if necessary.
Add the session cookie to the application response.
Get the session lifetime in seconds.
Get the cookie lifetime in seconds.
Determine if a session driver has been configured.
Determine if the configured session driver is persistent.
Resolve the given cache driver.
Details
__construct(SessionManager $manager, callable|null $cacheFactoryResolver = null)
Create a new session middleware.
protected mixed
handleRequestWhileBlocking(Request $request, Session $session, Closure $next)
Handle the given request within session state.
protected mixed
handleStatefulRequest(Request $request, Session $session, Closure $next)
Handle the given request within session state.
protected Session
startSession(Request $request, Session $session)
Start the session for the given request.
protected bool
configHitsLottery(array $config)
Determine if the configuration odds hit the lottery.
protected void
storeCurrentUrl(Request $request, Session $session)
Store the current URL for the request if necessary.
protected void
addCookieToResponse(Response $response, Session $session)
Add the session cookie to the application response.