22 lines
391 B
PHP
22 lines
391 B
PHP
|
<?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' ],
|
||
|
];
|
||
|
}
|
||
|
}
|