PHP code example of laasti / spot-provider

1. Go to this page and download the library: Download laasti/spot-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 / spot-provider example snippets



$config = [
    'name' => 'default', ///OR, full array
    'adapter'  => '',
    'host'     => '', //  'port'     => '',
    'protocol' => '',
    'socket'   => '',
    'dbsyntax' => '',
];

$container = new League\Container\Container();
$container->add('config.connections', [
    [
        'name' => 'default',
        //...
    ]
]);

$container->addServiceProvider('Laasti\SpotProvider\SpotProvider');

$container->get('Spot\Locator');//OR, $container->get('spot.locator.default');
$container->add('Acme\MyMapper')->withArguments(['Spot\Locator']);
$container->add('Acme\MyMsSqlMapper')->withArguments(['spot.locator.mssql']);