12345678910111213141516171819202122 |
- <?php
- namespace api\modules\v1\controllers;
- use yii\rest\ActiveController;
- use yii\rest\Controller;
- /**
- * Site controller
- */
- class SiteController extends ActiveController
- {
- public function actionIndex()
- {
- \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
- return [
- 'message' => 'API test Ok!',
- 'code' => 100,
- ];
- }
- }
|