I want to transfer all my methods from the controller, which are executed at the request of AJAX, in order to separate the folder. For example, create a file UserBundle/Ajax/Ajax.phpand put all my AJAX request methods into this file.
Is this the right approach to separate ajax requests from regular HTTP requests? I can not find examples of how to do this. Is this possible in symfony? Should I expand Symfony\Bundle\FrameworkBundle\Controller\Controllerin this file Ajax.php? It will be normal that there will be two folders in the package Ajaxand Controllercontains the controllers, but first for the ajax request and the second for the normal HTTP request?
Do you know any architectural design for this problem?
source
share