123456789101112131415161718192021 |
- <?php
- namespace api\modules\v1\controllers;
- use yii\rest\ActiveController;
- class GoodsController extends ActiveController
- {
- public $modelClass = 'api\models\User';
- public function actionIndex()
- {
- \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
- return [
- 'message' => 'API test Ok!',
- 'code' => 100,
- ];
- // return $this->render('index');
- }
- }
|