PHP code example of laasti / symfony-session-provider

1. Go to this page and download the library: Download laasti/symfony-session-provider 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/ */

    

laasti / symfony-session-provider example snippets



$container = new League\Container\Container;
$container->addServiceProvider('Laasti\SymfonySessionProvider\SymfonySessionProvider');

//To add configuration, by default it uses native sessions
$container->add('config.session', []);

//Get session
$session = $container->get('Symfony\Component\HttpFoundation\Session\SessionInterface');