Jonas Aeschlimann
Jonas Aeschlimann

Reputation: 135

Yii2 actionname with Uppercase do not work

i am using windows with yii2 advanced template. if i create an action like: actionShowInvoiced i am getting Error: Not Found #404 (Page not Found.

If i name the Action actionShowinvoiced it is working.

of course i call the function like /customer/showinvoiced or /customer/showInvoiced

i found this: Yii2 routing when using CamelCase action names

but i am not sure where i have to make this changes.... please help!

Upvotes: 0

Views: 774

Answers (1)

Pratik Karmakar
Pratik Karmakar

Reputation: 257

If your action is like "actionShowInvoiced" in Customer Controller, you should call it as '/customer/show-invoiced'.

If your action is like "actionShowinvoiced" in Customer Controller, you should call it as '/customer/showinvoiced'.

Upvotes: 3

Related Questions