Closed isudakoff closed 6 years ago
What is a namespace of Controller in your example? Is it based on yii\rest\ActiveController?
@pahanini No. It is based on yii\rest\Controller
This is because you use yii\rest\Controller
instead of yii\rest\ActiveController
.
This library tries to determine which model to use using mandatory modelClass
property of yii\rest\ActiveController
.
So there are two options for you:
yii\rest\ActiveController
or just determine property modelClass = 'User' in your Controller@restdoc-model
Why you search modelClass? I can use many models in one controller...
api/TestController.php