A base controller for AJAX only - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7) +--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13) +--- Thread: A base controller for AJAX only (/showthread.php?tid=69942) |
A base controller for AJAX only - dave friend - 02-01-2018 I have created a controller that extends CI_Controller and is designed to be the base class for Controllers that only accept xmlhttprequest (AJAX) requests. It can be found in this repository on GitHub. Any questions, comments, or insults are welcome. RE: A base controller for AJAX only - skunkbad - 02-01-2018 Although I'm not the captain of the REST train, this could possibly be more useful if it checked for all of the REST methods, and checked for input from php://input. A little snippet of my (non-CodeIgniter) class: PHP Code: /** |