LaravelSession

Summary

No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A
File
session.php
Package
Default
Class hierarchy
LaravelSession

Tags

None found

Constants

csrf_token

csrf_token

The string name of the CSRF token stored in the session.

Tags

None found

Properties

$instance

$instance : \Laravel\Session\Payload

The session singleton instance for the request.

Type

LaravelSessionPayload

Tags

None found

$registrar

$registrar : array

The third-party driver registrar.

Type

array

Tags

None found

Methods

load()

load() : void

Create the session payload and load the session.

static

Tags

None found

start()

start(string  $driver) : void

Create the session payload instance for the request.

Parameters

string $driver

static

Tags

None found

factory()

factory(string  $driver) : \Laravel\Session\Drivers\Driver

Create a new session driver instance.

Parameters

string $driver

Returns

LaravelSessionDriversDriver

static

Tags

None found

instance()

instance() : \Laravel\Session\Payload

Retrieve the active session payload instance for the request.

// Retrieve the session instance and get an item Session::instance()->get('name');

// Retrieve the session instance and place an item in the session
Session::instance()->put('name', 'Taylor');

Returns

LaravelSessionPayload

static

Tags

None found

started()

started() : boolean

Determine if session handling has been started for the request.

Returns

boolean

static

Tags

None found

extend()

extend(string  $driver, \Closure  $resolver) : void

Register a third-party cache driver.

Parameters

string $driver
Closure $resolver

static

Tags

None found

__callStatic()

__callStatic(  $method,   $parameters) 

Magic Method for calling the methods on the session singleton instance.

// Retrieve a value from the session $value = Session::get('name');

// Write a value to the session storage
$value = Session::put('name', 'Taylor');

// Equivalent statement using the "instance" method
$value = Session::instance()->put('name', 'Taylor');

Parameters

$method
$parameters

static

Tags

None found