Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I tell if a request is made with AJAX in Kohana 3?

I've tried these

request::is_ajax()

Request::instance()->is_ajax

To no avail. I've noticed in the request class there is a public property $is_ajax but I can't seem to be able to access the property.

What am I doing wrong?

like image 484
alex Avatar asked Dec 04 '22 13:12

alex


1 Answers

in case anyone comes back to this, in Kohana 3.1 it is now $this->request->is_ajax() if you are in a controller.

like image 172
Lowgain Avatar answered Dec 06 '22 03:12

Lowgain