Laravel doesn't use the native php session since Laravel 5.0. So I was wondering if it was OK to use $_SESSION as an expire_on_close session in Laravel app along with remember_on_close session().
You can't use $_SESSION in laravel, if you want use session in laravel, you can see the following below or session in Laravel
//put value session
$request->session()->put('key', 'value');
//get value session
$value = $request->session()->get('key');
//Retrieving All Session Data
$data = $request->session()->all();
//check session return true, if correct
if ($request->session()->has('key')) {
//
}
</div>
You can simply use the Laravel session global helper function.
To set the session data, use:
session(['key' => 'value']);
To retrieve the session data, use:
$value = session('key');
//output: value