PHP code example of celemas / session
1. Go to this page and download the library: Download celemas/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/ */
celemas / session example snippets
use Celemas\Session\Session;
$session = new Session();
$session->start();
$session->set('user_id', 123);
$userId = $session->get('user_id');
$session->flash->add('Signed in.');
$token = $session->csrf->token('profile');