Posted 1 month ago by markMngoma

Is there a way to avoid writing json responses in every controller as a response.

Is it possible to encapsulate all the data and functionally maybe using calls in a Middleware or something like; 'Accept': 'application/json' through headers.

Separating the view from the application is something that I would still like to do right now. If so, please provide me with a code example of how I would go about such.

Please sign in or create an account to participate in this conversation.