Commit 8325f7a8 by Alexander Makarov

Added db component. Added configuration section to readme.

parent 75917e2c
......@@ -84,3 +84,15 @@ assuming `yii-advanced` is directly under the document root of your Web server.
### Install from an Archive File
This is not currently available. We will provide it when Yii 2 is formally released.
GETTING STARTED
---------------
After template application and its dependencies are downloaded you need to initialize it and set some config values to
match your application requirements.
1. Execute `install` command selecting `dev` as environment.
2. Set `id` value in `console/config/main.php`, `frontend/config/main.php`, `backstage/config/main.php`.
3. Create new database. It is assumed that MySQL InnoDB is used. If not, adjust `console/migrations/m130524_201442_init.php`.
4. In `common/config/params.php` set your database details in `components.db` values.
......@@ -16,6 +16,7 @@ return array(
'modules' => array(
),
'components' => array(
'db' => $params['components.db'],
'cache' => $params['components.cache'],
'user' => array(
'class' => 'yii\web\User',
......
......@@ -6,4 +6,11 @@ return array(
'components.cache' => array(
'class' => 'yii\caching\FileCache',
),
'components.db' => array(
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
'username' => 'root',
'password' => '',
),
);
\ No newline at end of file
......@@ -16,6 +16,7 @@ return array(
'modules' => array(
),
'components' => array(
'db' => $params['components.db'],
'cache' => $params['components.cache'],
'log' => array(
'class' => 'yii\logging\Router',
......
......@@ -16,6 +16,7 @@ return array(
'modules' => array(
),
'components' => array(
'db' => $params['components.db'],
'cache' => $params['components.cache'],
'user' => array(
'class' => 'yii\web\User',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment