I still under development and I don't want to use clean URLs in my Yii2 right now.
I added the following code to the advanced Yii2 project navbar About
to make submenu under About:
[
'label' => 'About',
'url' => ['/site/about'],
'items' => [
['label' => 'Invoices', 'url' => 'invoices/index'],
]
],
Normally, the invoices
controller is accessed by: /?r=invoices
from the client's address bar. However, the above code generates /invoices/index
which gives Page not found error
because I did not enabled clean URLs yet.
My question is, how could I add, accessible, new menu items as regarded above without clean URLs enabled while keeping the code as it is after enabling clean URLs?