$pharms = Pharmacy::find()
->where(['pharm_id' => $pharm_id])
->limit(1)
->one();
$pharms = Pharmacy::findOne(['pharm_id' => $pharm_id]);
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
],
//Yii::$app->mailer->useFileTransport = false;
Yii::$app->mailer->setTransport([
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.gmail.com',
'username' => 'login',
'password' => 'pwd',
'port' => '465',
'encryption' => 'SSL',
]);
// config/web.php
$config=[
...
'params' => $params,
];
//return $config;
return array_replace_recursive(
$config, (file_exists(YII_ENV_SETS_DIR.'/web-config-snapshot.php') ? require(YII_ENV_SETS_DIR.'/web-config-snapshot.php') : array())
);