====== web.php ======
===== Gii aktivieren =====
Ausserhalb des $config-Arrays:
if (YII_ENV_DEV) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = 'yii\debug\Module';
$config['bootstrap'][] = 'gii';
//$config['modules']['gii'] = 'yii\gii\Module';
$config['modules']['gii']['class'] = 'yii\gii\Module';
$config['modules']['gii']['allowedIPs'] = ['192.168.0.*'];
}
===== Mailer =====
Swiftmailer installieren über Composer?
'mail' => [
'class' => 'yii\swiftmailer\Mailer',
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emails.
'viewPath' => '@app/mail',
'useFileTransport' => false,//set this property to false to send mails to real email addresses
//comment the following array to send mail using php's mail function
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.mailgun.org',
'username' => 'postmaster@example.ch',
'password' => 'ewfwefewhiu',
'port' => '587',
'encryption' => 'tls',
],
],
http://www.yiiframework.com/doc-2.0/yii-swiftmailer-mailer.html