Yii 2 Rest

I got problem in implementing REST API in my app

basically I want my default format is json instead of xml so I create base controller like this




class BaseController extends Controller

{

	public $supportedFormats = [

		'application/json' => Response::FORMAT_JSON,

	];

} 



however I want to make same for yii/rest/ActiveController to make default json also, I don’t want to create “BaseActiveController” just to add supportedFormats as well

Did you check out this?

Hope it helps.