In order to allow auto-loading, Yii2 uses a simple standard to set names.
Routes that refer respectively to module, controller, and the action requested take the following format:
We will look at each element in detail as follows:
- The ModuleID is optional, so often the format is ControllerID/ActionID
- The ModuleID must be specified in the module's configuration property, under the same name
- The ControllerID and ActionID should contain only English characters in lowercase, digits, underscores, dashes, and forward slashes
An example of route is
site is the ControllerID and
index is the ActionID.
Starting from ControllerID, it is very easy to create the Controller ...