codeigniter - Controller methods that are only called by AJAX, make private? -
i have methods on controllers forgot_password
, login
etc.
these called via ajax default can browse them via url due way ci works.
can somehow make them private , still access them via ajax? what's done thing here?
the best practice here use $this->input->is_ajax_request()
if(! $this->input->is_ajax_request()) { redirect('404'); }
Comments
Post a Comment