Yii 2 does not see eschen?

the controller

<?php

namespace app\modules\myshop\controllers;

use app\modules\myshop\models\SignupForm;
use yii\web\Controller;

/**
 * Default controller for the `myshop` module
*/
class DefaultController extends Controller {

/**
 * Renders the index view for the module
 * @return string
*/
 public function actionIndex() {
 return $this--->render('index');
}

 // The pop modal window fill in the performance signup.php forms with fields
 public function actionSignup() {
 $model = new SignupForm();
 // $model = new \app\models\SignupForm();
 //$model->id =$userid;
 return $this->renderPartial('signup', [
 'model' => $model,
]);
}

// By clicking in the modal window on Submit the form is sent to the administrator mail 
 public function actionSubmitsignup() {
 $model = new SignupForm();
$model->load(Yii::$app->request->post());

 if ($model->load(Yii::$app->request->post()) && $model->contact(Yii::$app->params['adminEmail'])) {

 //save the password
 $success = true;
 return json_encode($success);
 } else {
 return $this->renderPartial('signup', [
 'model' => $model,
]);
}
}

}


structure

yFMzCf
'urlManager' => [
 'class' => 'yii\web\UrlManager',
 // Disable index.php
 'showScriptName' => false,
 // Disable r= routes
 'enablePrettyUrl' => true,
 'rules' => array(
 '<controller:\w+>/<id:\d+>' => '<controller>/view',
 '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
 '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
 // 'signup' => '/myshop/default/signup',
 // 'submitsignup' => '/myshop/submitsignup',
),
 ],</action></controller></action:\w+></controller:\w+></action></controller></id:\d+></action:\w+></controller:\w+></controller></id:\d+></controller:\w+>
July 4th 19 at 23:39
2 answers
July 4th 19 at 23:41
Solution
Try the following
'<_m:[\w\-]+>' => '<_m>/default/index',
 '<_m:[\w\-]+>/<_c:[\w\-]+>' => '<_m>/<_c>/index',
 '<_m:[\w\-]+>/<_c:[\w\-]+>/<_a:[\w\-]+>' => '<_m>/<_c>/<_a>',
 '<_m:[\w\-]+>/<_c:[\w\-]+>/<id:\d+>' => '<_m>/<_c>/view',
 '<_m:[\w\-]+>/<_c:[\w\-]+>/<id:\d+>/<_a:[\w\-]+>' => '<_m>/<_c>/<_a>',</id:\d+></id:\d+>

Append after the basic rules.
Start with the first line, will see the module, then proceed.
Might have to edit the links in the navigation.
July 4th 19 at 23:43
Solution
for action controller module necessary to rule a few more:
'<module:\w+>/<controller:\w+>/<action:\w+>' = > '<module>/<controller>/<action>',</action></controller></module></action:\w+></controller:\w+></module:\w+>

This is of course prfile for all.
has been custom different. For example to remove from the url myshop:
'<controller:\w+>/<action:\w+>' => 'myshop/<controller>/<action>',</action></controller></action:\w+><controller:\w+>

Find more questions by tags Yii