class StartSession (View source)
protected SessionManager | $manager | The session manager. | |
protected callable|null | $cacheFactoryResolver | The callback that can resolve an instance of the cache factory. |
void | __construct(SessionManager $manager, callable $cacheFactoryResolver = null) Create a new session middleware. | |
mixed | handle(Request $request, Closure $next) Handle an incoming request. | |
mixed | handleRequestWhileBlocking(Request $request, Session $session, Closure $next) Handle the given request within session state. | |
mixed | handleStatefulRequest(Request $request, Session $session, Closure $next) Handle the given request within session state. | |
Session | startSession(Request $request, Session $session) Start the session for the given request. | |
Session | getSession(Request $request) Get the session implementation from the manager. | |
void | collectGarbage(Session $session) Remove the garbage from the session if necessary. | |
bool | configHitsLottery(array $config) Determine if the configuration odds hit the lottery. | |
void | storeCurrentUrl(Request $request, Session $session) Store the current URL for the request if necessary. | |
void | addCookieToResponse(Response $response, Session $session) Add the session cookie to the application response. | |
void | saveSession(Request $request) Save the session data to storage. | |
int | getSessionLifetimeInSeconds() Get the session lifetime in seconds. | |
DateTimeInterface|int | getCookieExpirationDate() Get the cookie lifetime in seconds. | |
bool | sessionConfigured() Determine if a session driver has been configured. | |
bool | sessionIsPersistent(array $config = null) Determine if the configured session driver is persistent. | |
Store | cache(string $driver) Resolve the given cache driver. |
Create a new session middleware.
Handle the given request within session state.
Handle the given request within session state.
Start the session for the given request.
Remove the garbage from the session if necessary.
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.
Save the session data to storage.
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.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Session/Middleware/StartSession.html