How to use AJAX with Slim 3?

Yeah Thank you I found it the problem was that I was struggling on how to send the request to the controller from JQuery but after I calm down and think I remembered that if I send the JQuery request to the route then the route will pass it to the controller hahahahh lol I feel really stupid now