Correct Way to Use Rest in Yii Without a Model

I know that normally Yii is set up to use a model for the REST calls but what if you just need to make calls that don’t use any model at all? Do you just ignore the modelClass and build the REST API solely around the methods of the controller?



Awesome thanks!

extending \yii\rest\Controller instead of \yii\rest\ActiveController may be enough as you won’t need CRUD actions any way. except the OptionsAction which you can include by adding this :

public function actions() 


    return [

        'options' => [

            'class' => 'yii\rest\OptionsAction'