1. Go to this page and download the library: Download componenta/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/ */
componenta / session example snippets
use Componenta\Session\SessionData;
$data = new SessionData(['user_id' => 42]);
$data->getInt('user_id'); // 42
$data->set('theme', 'dark');
$data->pull('theme'); // "dark" and removes it
$data->only('user_id');
$data->except('csrf_token');