PHP code example of konkon1234 / laravel-native-session-bridge

1. Go to this page and download the library: Download konkon1234/laravel-native-session-bridge 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/ */

    

konkon1234 / laravel-native-session-bridge example snippets


$handler = new \Konkon1234\LaravelNativeSessionBridge\LaravelFormatSessionHandlerClient($pdo, $db_name, [
    // Give the same settings as Laravel

    'table' => 'sessions',
    'encrypt' => false,
    'app_key' => null,
    'cipher' => 'AES-256-CBC',
    'cookie' => 'laravel_session',
    'lifetime' => 120,
    'path' => '/',
    'domain' => null,
    'secure' => false,
    'http_only' => true,
]);

ini_set('session.serialize_handler', 'php_serialize'); // 'message from native';