InteractsWithSession

trait InteractsWithSession (View source)

Methods

$this withSession(array $data)

Set the session to the given array.

void session(array $data)

Set the session to the given array.

void startSession()

Start the session for the application.

void flushSession()

Flush all of the current session data.

void seeInSession(string|array $key, mixed $value = null)

Assert that the session has a given value.

void assertSessionHas(string|array $key, mixed $value = null)

Assert that the session has a given value.

void assertSessionHasAll(array $bindings)

Assert that the session has a given list of values.

void assertSessionMissing(string|array $key)

Assert that the session does not have a given key.

void assertSessionHasErrors(string|array $bindings = [], mixed $format = null)

Assert that the session has errors bound.

void assertHasOldInput()

Assert that the session has old input.

Details

$this withSession(array $data)

Set the session to the given array.

Parameters

array $data

Return Value

$this

void session(array $data)

Set the session to the given array.

Parameters

array $data

Return Value

void

protected void startSession()

Start the session for the application.

Return Value

void

void flushSession()

Flush all of the current session data.

Return Value

void

void seeInSession(string|array $key, mixed $value = null)

Assert that the session has a given value.

Parameters

string|array $key
mixed $value

Return Value

void

void assertSessionHas(string|array $key, mixed $value = null)

Assert that the session has a given value.

Parameters

string|array $key
mixed $value

Return Value

void

void assertSessionHasAll(array $bindings)

Assert that the session has a given list of values.

Parameters

array $bindings

Return Value

void

void assertSessionMissing(string|array $key)

Assert that the session does not have a given key.

Parameters

string|array $key

Return Value

void

void assertSessionHasErrors(string|array $bindings = [], mixed $format = null)

Assert that the session has errors bound.

Parameters

string|array $bindings
mixed $format

Return Value

void

void assertHasOldInput()

Assert that the session has old input.

Return Value

void

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.2/Illuminate/Foundation/Testing/Concerns/InteractsWithSession.html