PHP code example of marko / session-database
1. Go to this page and download the library: Download marko/session-database 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/ */
marko / session-database example snippets
use Marko\Session\Contracts\SessionInterface;
public function __construct(
private readonly SessionInterface $session,
) {}
public function handle(): void
{
$this->session->set('user_id', 42);
}