laravel php ini session code example Example 1: session laravel session(['name' => 'data']); Example 2: session in laravel session()->regenerate();