To retrieve data from session, and it doesn't matter if it's flash or not. Flashed data are visible only for the next request.
$value = session('key');
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi All,
I have a controller that when it creates / stores a record it redirects to a edit route, when testing i am using a factory make method for the record, posting this data to the store method. Before the redirect in the store method it flashes some data to the session then redirects.
I am looking through the docs and the source but can't see a method to get the data that has been flashed to the session, can anyone point me in the right direction?
Thanks Jamie
Please or to participate in this conversation.