Support the ongoing development of Laravel.io →
Session Views
Last updated 2 years ago.
0

When passing a parameter i.e. subtitle is this case to a view you are not putting it within the Session. Meaning to access it on the view you just need to do $subtitle. If you do Session::put('key', 'value') the value will be stored in the session and can be access via Session::get('key') and you can check via the has method.

Last updated 2 years ago.
0

matthewburrow said:

When passing a parameter i.e. subtitle is this case to a view you are not putting it within the Session. Meaning to access it on the view you just need to do $subtitle. If you do Session::put('key', 'value') the value will be stored in the session and can be access via Session::get('key') and you can check via the has method.

Yes, but I have found this in the documentation:

Note: Since the with method flashes data to the session, you may retrieve the data using the typical Session::get method.

http://laravel.com/docs/responses#redirects

Does that apply only to redirects?

Last updated 2 years ago.
0

Yes that only applies to redirects.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

mabasic mabasic Joined 3 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.