Tag: ajax

  • Symfony 5+ how to view dump output with AJAX requests

    Symfony 5+ how to view dump output with AJAX requests

    So the idea is to be able to use the Symfony VarDumper component to be able to dump values when sending an AJAX request and view them for debugging while in development mode, but not in production mode. Create a new directory To do this you will need to create an event subscriber and listen […]

  • Symfony how to get query string values sent by AJAX calls

    Symfony how to get query string values sent by AJAX calls

    When using a Symfony API endpoint for getting values such as maybe something like an auto-complete feature you will need to be able to send some text(what the user enters) to the backend. Then have the backend return a response based on that. For example with an auto complete feature, you might want to send […]

  • How to secure individual Symfony AJAX api routes without using API Platform

    How to secure individual Symfony AJAX api routes without using API Platform

    I am in the process of updating this article entirely. Please stay tuned. Creating the Symfony route is easy. Checking if the request was sent by AJAX is again easy. But what stops a mischievous hacker from hitting that endpoint and trying to get a list of used emails or something else with a script? […]

  • How to make AJAX requests to Symfony 5+ controllers

    How to make AJAX requests to Symfony 5+ controllers

    I couldn’t find anything in the documentation about this and there is little on the internet about it too.  There is probably a Bundle somewhere for this or some Symfony way, but I didn’t find anything. I did find this SymfonyCast about submitting a whole form. If you need to test your Controller route read […]