This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi. Working on my first project with October and developing some custom plugins I ran into this question. How do I send http POST requests to some page of my project. Then when I receive the POST data where and how do I retrieve the data sent?
I have read and came to some level of understanding of the plugin structure, in which each plugin is a MVC on its own. But coming from the Laravel, and its single routes file for the whole project in which u specify the mappings I got confused.
You could add a routes.php to your plugin, but it's best to avoid it unless you really need those routes - and always add a unique prefix to avoid breaking any other plugins.
Instead, you should create a component for your plugin, which will be able to include AJAX handlers. More info on components and the AJAX framework is in the docs.
Last updated
1-2 of 2