marko/session-database

Database session driver for Marko Framework

Maintainers

Package info

github.com/marko-php/marko-session-database

Type:marko-module

pkg:composer/marko/session-database

Transparency log

Statistics

Installs: 83

Dependents: 0

Suggesters: 1

Stars: 0

0.8.4 2026-06-24 20:23 UTC

This package is auto-updated.

Last update: 2026-06-25 02:33:09 UTC


README

Database session driver — stores session data in a SQL table for shared access across multiple application servers.

Installation

composer require marko/session-database

Requires marko/database for the database connection.

Quick Example

use Marko\Session\Contracts\SessionInterface;

public function __construct(
    private readonly SessionInterface $session,
) {}

public function handle(): void
{
    $this->session->set('user_id', 42);
}

Installing this package automatically registers the database handler, binds SessionInterface, and adds SessionMiddleware globally. No manual configuration is needed.

Documentation

Full usage, API reference, and examples: marko/session-database