accounts/api/controllers/Controller.php

18 lines
385 B
PHP
Raw Normal View History

<?php
namespace api\controllers;
class Controller extends \yii\rest\Controller {
public $enableCsrfValidation = true;
public function behaviors() {
$parentBehaviors = parent::behaviors();
// xml нам не понадобится
unset($parentBehaviors['contentNegotiator']['formats']['application/xml']);
return $parentBehaviors;
}
}