I am using laravel 5.6
and i use redis
for my SESSION DRIVER
:
.env:
SESSION_DRIVER=redis
Now in my web.php:
<?php
use Illuminate\Support\Facades\Session;
Route::get('/',function(){
if(Session::has('a')){
return Session::all();
}
Session::put('a','test',10);
return 'reload';
});
Now i want to get my session time left with other url.But i couldn't find any command to get it!
Note : i don't want something like Config::get('session.lifetime')
or ... beacuse i set a custom time in third argument!! of Session::put('a','test',10);
Example 1:
Session::put('a','test',100);
After 30 min i want to get time left(70)
Example 2:
Session::put('a','test',266);
after 40 min i want to get time left(226)