PHP code example of overtrue / laravel-single-session
1. Go to this page and download the library: Download overtrue/laravel-single-session library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
overtrue / laravel-single-session example snippets
'providers' => [
Overtrue\LaravelSingleSession\SingleSessionServiceProvider::class
],
// config/session.php
// The storage for store the last session id.
'last_session_storage' => 'cache', // cache(default)/database
// The field name of last session id.
'last_session_field' => 'last_session_id',
// The path of redirect when logout after session changed.
'redirect_path' => '/',