Hi guys,
If I use original main-local.php I see captcha image in site/contact, if I use my extended main-local.php, I won’t see captcha image! As I used to experience, I have to define a rule in urlManger.Any ideas,how to define this rule? Original main-local:
<?php
Original main-local:
<?php
return [
'components' => [
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
],
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
// 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.
'useFileTransport' => true,
],
],
];
Extended main-local:
<?php
return [
'aliases' =>
[
'@uploadedfilesdir' => '@app/mails'
],
'bootstrap' => ['debug'],
'modules' => [
'debug' => [
'class' => 'yii\debug\Module',
]
],
'components' => [
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
],
'urlManager' => [
'class' => 'yii\web\UrlManager',
'enablePrettyUrl' => true,
'showScriptName' => true,
'enableStrictParsing' => true,
'rules' => [
'/' => 'site/index',
'login' => 'site/login',
'logout' => 'site/logout',
'contact' => 'site/contact',
'signup' => 'site/signup',
'formular' => 'site/script',
'reset' => 'site/request-password-reset',
'bewerbungen' => 'bewerbungen/index',
'country' => 'country/index',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>'
],
],
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=yii2_widget',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
],],
];
?>