A
A
Andrey2016-11-07 14:44:02
Yii
Andrey, 2016-11-07 14:44:02

How to set a different response type for a module?

Hello.
There is yii2-advanced, which answers all requests in json.
is there a way to teach it in gii to respond in html format?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Fedorov, 2016-11-07
@VladimirAndreev

You can change the response format for a specific module/controller either using the code
or using the filter ContentNegotiator
Accordingly, in order to change the format of the gii response, you should use the filter

D
Dmitry, 2016-11-07
@slo_nik

Good afternoon.
Perhaps this article (Body of the answer) will help you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question