1. Go to this page and download the library: Download brandonlamb/spot 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/ */
brandonlamb / spot example snippets
// PostgreSQL
$db = new Pdo('pgsql:host=localhost;dbname=jdoe', 'jdoe', 'mypass');
$cfg = \Spot\Config::getInstance();
$adapter = $cfg->addConnection('db', new \Spot\Adapter\Pgsql($db));
$adapter = $cfg->connection('db');
function get_mapper() {
static $mapper;
if($mapper === null) {
$mapper = new \Spot\Mapper($cfg);
}
return $mapper;
}