Yii2 Overriding REST Controller Functions

Hi. I am new in yii world. I am using yii2 basic template. I want to develop restful api using yii2. I followed these two tutorials to create restful api.



First one is found on yii website and other one is on wiki page of yii framework. With the help of first tutorial I created restful api with the help of yii/rest/ActiveController and it works perfect for one resource. Then I decided to write some complex api which manipulates more than 2 resources. I have found that methods these methods are created automatically if you use yii/rest/ActiveController index, view, create, update, delete. I want to override these methods so I can manipulate more than 2 resources. For example that I have a problem that I want to create 2 resources by simply calling one method but I can’t if I am using yii/rest/ActiveController. What’s the solution of this problem? Do I have to write custom services? I also tried to write custom services using second tutorial which I mentioned earlier. I have a problem in their verbs filter.