I am developing REST API and I have an action Myfunction() and i wand to use expand
Here is my code
public function actionMyfunction() {
$query = $this->model::find();
$query->someCondition()->all();
return $query
}
My Model is
public function fields() {
return [
'id',
'name',
];
}
public function extraFields() {
return ['status'];
}
This url not working for me
v1/userroles/myfunction?expand=status
Thanks