I'm new to LARAVEL. I want to send an AJAX request to a function of controller that this function will run very big loop (takes about 2 minutes). I want to have a button that when click on it, it send a request with AJAX to the controller that stops the function that is running big loop. any idea?
After second click (to stop function) you can send to database information about it. In one of 10 loops function can check database and if function get message "stop" then will stopped.