banki.test/controllers/ApiController.php

22 lines
391 B
PHP
Raw Normal View History

<?php
namespace app\controllers;
use app\models\Parameter;
use yii\data\ActiveDataProvider;
use yii\rest\IndexAction;
class ApiController extends \yii\rest\Controller
{
public function actionIndex()
{
return Parameter::find()->with(['icon', 'iconGray'])->all();
}
public function verbs()
{
return [
'index' => [ 'GET' ],
];
}
}