A
A
agent11562017-01-03 13:46:31
Yii
agent1156, 2017-01-03 13:46:31

How to connect to two databases in yii 2?

I connected to the first database using the db.php file.
Then I wrote the following code in config.php

'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=localhost;dbname=rbac',
            'username' => 'gallery',
            'password' => 'gallery',
            'charset' => 'utf8',
        ],

QUESTION. How to pull data from rbac??

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question