I have a weird issue that I think is configuration related. I have pretty urls on, and I have a route defined as:
'/customers/update/<id:\d+>' => '/customers/default/update'
And for good measure my action:
public function actionUpdate($id) {}
My controller is part of a module and maps correctly but my action doesnt seem to be receiving the parameter. If i leave out the parameter in the route and the action, the action gets called correctly and if I give the parameter a default value everything works as intended. To summarise, I get an error saying parameter 1 is missing.
Any ideas?
Ugh, solved it. I was extending the wrong controller class... I was using
yii/base/Controller
instead of
yii/web/Controller
Could have been looking for this for a while...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With