user3381968
user3381968

Reputation: 43

Unable to resolve the request in yii while calling new controller in module

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

Answers (1)

Bogdan Burym
Bogdan Burym

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

Related Questions