<?php
//app/config/config.php
return new \Phalcon\Config(array(
'database' => array(
'adapter' => 'Mysql',
'host' => '127.0.0.1',
'username' => 'root',
'password' => 'root',
'dbname' => 'taobao',
'prefix' => 'sh_',
),
));
//app/config/services.php
$di->set('db', function () use ($config) {
return new DbAdapter(array(
'host' => $config->database->host,
'username' => $config->database->username,
'password' => $config->database->password,
'dbname' => $config->database->dbname,
'prefix' => $config->database->prefix
));
});
How can I get the 'prefix' params in Model ?