REST Url Manager

Can somebody show what should I do to add the additional employees parameters to the company Activecontroller.


I have a company controller, with byEmployee($employeeID) action.

I want to extract the details of employee 45 working in company 3.

Which I can easily do in regular controller with :


you need to enable the urlManager and add rule for that route

'urlManager' => [

            'enablePrettyUrl' => true,

            'showScriptName' => false,

            'rules' => [

                '<companies:[\w+]>/<companyid:[\d+]>/<employees:[\w+]>/<employeeid: [\d+]>' => '<controllerName>/<actionName>'