fix patho connection
parent
c601a69987
commit
ad0090fd13
|
|
@ -13,7 +13,7 @@ class SiteController extends Controller
|
||||||
return [
|
return [
|
||||||
[
|
[
|
||||||
'class' => 'yii\filters\ContentNegotiator',
|
'class' => 'yii\filters\ContentNegotiator',
|
||||||
'only' => ['docs', 'index'],
|
'only' => ['docs', 'index', 'test-db'],
|
||||||
'formats' => [
|
'formats' => [
|
||||||
'application/json' => Response::FORMAT_HTML,
|
'application/json' => Response::FORMAT_HTML,
|
||||||
],
|
],
|
||||||
|
|
@ -77,4 +77,12 @@ class SiteController extends Controller
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function actionTestPatho()
|
||||||
|
{
|
||||||
|
$users = Yii::$app->patho->createCommand('SELECT * FROM user')->queryAll();
|
||||||
|
echo '<pre>';
|
||||||
|
var_dump($users);
|
||||||
|
die();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -17,6 +17,14 @@ return [
|
||||||
'charset' => 'utf8',
|
'charset' => 'utf8',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'patho' => [
|
||||||
|
'class' => \yii\db\Connection::class,
|
||||||
|
'dsn' => 'mysql:host=172.16.0.7;dbname=prolab_main', //161.82.188.168
|
||||||
|
'username' => 'apiuser',
|
||||||
|
'password' => 'Aa157344121165',
|
||||||
|
'charset' => 'utf8',
|
||||||
|
],
|
||||||
|
|
||||||
'mailer' => [
|
'mailer' => [
|
||||||
'class' => 'yii\swiftmailer\Mailer',
|
'class' => 'yii\swiftmailer\Mailer',
|
||||||
'viewPath' => '@common/mail',
|
'viewPath' => '@common/mail',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue