PHP code example of acredula / support

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

    

acredula / support example snippets


use Acredula\Support\ServiceProvider\ConfigServiceProvider;

$container->addServiceProvider(new ConfigServiceProvider([
    'path' => __DIR__ . '/../config/config.php',
    'env'  => __DIR__ . '/../.env'
]));

use Acredula\Support\ServiceProvider\AuraSqlServiceProvider;

$container->addServiceProvider(new AuraSqlServiceProvider('mysql'));

use Acredula\Support\ServiceProvider\SwiftMailerServiceProvider;

$container->addServiceProvider(new SwiftMailerServiceProvider);

use Acredula\Support\ServiceProvider\TwigServiceProvider;

$container->addServiceProvider(new TwigServiceProvider([
    'templates'  => __DIR__ . '/../templates',
    'cache' => __DIR__ . '/../writable/directory',
    'extensions' => [
        'Acme\Tekkers\UnbelievableTekkersExtension'
        'Acme\Large\LargeGravyExtension'
    ]
]));

use Acredula\Support\ServiceProvider\AuraSessionServiceProvider;

$container->addServiceProvider(new AuraSessionServiceProvider);