Closed raxan closed 9 years ago
Hi, follow this link http://vegas-cmf.github.io/1.0/guide/db/mysql.html and use Phalcon\Db\Adapter\Pdo\Postgresql instead of Phalcon\Db\Adapter\Pdo\Mysql
class DbServiceProvider implements ServiceProviderInterface
{
const SERVICE_NAME = 'db';
/**
* {@inheritdoc}
*/
public function register(DiInterface $di)
{
$arrayConfig = $di->get('config')->{self::SERVICE_NAME};
$db = new \Phalcon\Db\Adapter\Pdo\Postgresql($arrayConfig);
$db->setEventsManager($di->getShared('eventsManager')); // @see profiling section
return $db;
}
public function getDependencies()
{
return array();
}
}
more info you can find here: http://docs.phalconphp.com/pt/latest/api/Phalcon_Db_Adapter_Pdo_Postgresql.html
hope this helps
WOW, seem easy.
Big Thanks!
Hi
It's possible use PostgreSQL?
Thanks