Hi,
My Yii2 application has advanced template.
App has 3 endpoints
rest
backend
frontend
And I wanted to call api methods from backend or frontend.
It work fine with this call in the backend controller
$response = Yii::$app->runAction('api/availability/create_availability');
But the problem is that when return create_availability, the content type of page change because i call internal api function and i can’t render the page in the backend controller.
How can i call the api from backend without change header content-type ?