PHP code example of cekurte / silex-manager-provider

1. Go to this page and download the library: Download cekurte/silex-manager-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/ */

    

cekurte / silex-manager-provider example snippets




use Cekurte\Environment\Environment;
use Cekurte\Silex\Manager\Provider\ManagerServiceProvider;

// ...
$app['cekurte.manager.providers'] = [
    // ...
    'Silex\Provider\SessionServiceProvider' => [
        'register' => true,
    ],
    'Silex\Provider\SwiftmailerServiceProvider' => [
        'register' => true,
        'type'     => 'array',
        'src'      => [
            'swiftmailer.use_spool' => Environment::get('SWIFTMAILER_USE_SPOOL'),
            'swiftmailer.options'   => [
                'host'       => Environment::get('SMTP_HOST'),
                'port'       => Environment::get('SMTP_PORT'),
                'username'   => Environment::get('SMTP_USERNAME'),
                'password'   => Environment::get('SMTP_PASSWORD'),
                'encryption' => Environment::get('SMTP_ENCRYPTION'),
                'auth_mode'  => Environment::get('SMTP_AUTH_MODE'),
            ],
        ],
    ],
    // ...
];

$app->register(new ManagerServiceProvider());

// ...