InteractsWithSession
trait InteractsWithSession (View source)
Methods
$this | withSession(array $data) Set the session to the given array. | |
$this | session(array $data) Set the session to the given array. | |
$this | startSession() Start the session for the application. | |
$this | flushSession() Flush all of the current session data. | |
$this | seeInSession(string|array $key, mixed $value = null) Assert that the session has a given value. | |
$this | assertSessionHas(string|array $key, mixed $value = null) Assert that the session has a given value. | |
$this | assertSessionHasAll(array $bindings) Assert that the session has a given list of values. | |
$this | assertSessionMissing(string|array $key) Assert that the session does not have a given key. | |
$this | assertSessionHasErrors(string|array $bindings = [], mixed $format = null) Assert that the session has errors bound. | |
$this | assertHasOldInput() Assert that the session has old input. |
Details
$this withSession(array $data)
Set the session to the given array.
$this session(array $data)
Set the session to the given array.
protected $this startSession()
Start the session for the application.
$this flushSession()
Flush all of the current session data.
$this seeInSession(string|array $key, mixed $value = null)
Assert that the session has a given value.
$this assertSessionHas(string|array $key, mixed $value = null)
Assert that the session has a given value.
$this assertSessionHasAll(array $bindings)
Assert that the session has a given list of values.
$this assertSessionMissing(string|array $key)
Assert that the session does not have a given key.
$this assertSessionHasErrors(string|array $bindings = [], mixed $format = null)
Assert that the session has errors bound.
$this assertHasOldInput()
Assert that the session has old input.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Foundation/Testing/Concerns/InteractsWithSession.html