Hi:
I’m using RestFul Web Services (http://www.yiiframework.com/doc-2.0/guide-rest-quick-start.html)
I need to use my own custom “view” action and I’m unsetting view action in my controller:
public function actions()
{
$actions = parent::actions();
unset($actions['view']);
return $actions;
}
So then I can use my own view action:
public function actionView($id)
{
// my stuff
}
The problem is that afterFind method in my model is not executing, and "fields" (where I can define which fields to return depending on action) is not executing either.
How can I use these 2 overrides function in my model (afterFind and fields), but using a custom action for "view" in a RestFul Controller ?
Thank you