Reputation: 43
I created a module named CustomerOnBoarding. If I call an url like
localhost/application_name/index.php?r=CustomerOnBoarding
it's calling its defaultcontroller and view. While on the other hand if i create my own controller and its view and call it by
localhost/yii_learn/index.php/CustomerOnBoarding/Test/
then it's not working and throwing an error like
Unable to resolve the request "CustomerOnBoarding/Test/index"
I have also changed urlmanager in config's main.php file like:
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array('CustomerOnBoarding/Test/'=>'CustomerOnBoarding/Test/index'),
),
Upvotes: 0
Views: 319
Reputation: 5512
You need to call your new controller NewController
action new
like this:
http://localhost/application_name/index.php?r=CustomerOnBoarding/NewController/new
Upvotes: 0