I am new to Yii2. I am getting used to it slowly. I am using a module to build customer data. I have a customer table. My module name is Customer. My controller name is Customer. Finally my url structure after enabling pretty url is as below.
http://localhost/basic/web/customers/customers
http://localhost/basic/web/customers/customers/create
etc
How do i remove the module name(customer) from the url? I want to make something like this.
http://localhost/basic/web/customers/
http://localhost/basic/web/customers/create
My folder structure
Modules
----Customers
------controllers
-----------DefaultController
-----------CustomersController
------Models
-----------Customers
------Views
-----------customers
--------------create
--------------update
...
----Module.php
I dont know how to insert rules in urlManager even after following this: Yii - Hiding module name in URL
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => array(
'<controller:\w+>/<action:\w+>'=>'module/controller/action',
),