mardi 2 octobre 2018

Laravel Session Time Out Remaining

There's a variety of answers regarding detecting IF the session has timed out. I am NOT asking that.

I am asking, how can I tell exactly how much time is remaining the user's Laravel session.

Assume I am using the latest version of Laravel.

I am strongly interested in knowing what the Laravel subsystem thinks is the time left remaining before it's native/built-in session timeout expires.

I am strongly against rolling my own, or creating my own custom timer of any sort.

Not that it matters, but my session lifetime setting configuration (session.php) looks like this:

 /*
    |--------------------------------------------------------------------------
    | Session Lifetime
    |--------------------------------------------------------------------------
    |
    | Here you may specify the number of minutes that you wish the session
    | to be allowed to remain idle before it expires. If you want them
    | to immediately expire on the browser closing, set that option.
    |
    */

    'lifetime' => env('SESSION_LIFETIME', 10),



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire