rodrigue
rodrigue

Reputation: 125

control actions and urls in yii

I am trying to perform different actions stored in the same controller using yii.

I have an action called "test" and I can access it by typing the url "localhost/blah/test", this url calls the method "actiontest()" in my controller, now what I want is by typing "localhost/blah/test/create" access the method "actioncreate()" which is in the same controller.

Is there any way to achieve that?

Upvotes: 1

Views: 477

Answers (1)

iurii_n
iurii_n

Reputation: 1370

define in routes this rule in config:

'rules' => array(
    'localhost/blah/test/create' => 'localhost/blah/create',
    ....
),

Upvotes: 1

Related Questions