A
A
Alexander2018-05-28 22:03:10
Slim Framework
Alexander, 2018-05-28 22:03:10

How to correctly and simply implement output in json or view in CRUD?

Good afternoon.
For anyone, many have come across a similar question - add AJAX processing to CRUD - that is, you need to pass, depending on the request - AJAX or not - return either a redirect, or json model data, or an error with certain statuses. Linivo to add processing to each controller - if that. Is there any option to avoid this? Middleware for example, I really can't figure out how to implement it.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question