1/**
2 * Static method
3 */
4Session::put('key', $value); // Set session variable
5Session::get('key') // Get session variable
6
7/**
8 * Instance method
9 */
10session(['key' => $value]); // Set session variable
11session('key'); // Get session variable
1use Illuminate\Support\Facades\Session;
2
3Session::flash('message','This is a message!');
4
5then in your view::
6
7@if(Session::has('message'))
8
9<p class="alert
10{{ Session::get('alert-class', 'alert-info') }}">{{Session::get('message') }}</p>
11
12@endif