$request->ajax()
Checks if this request is an Ajax request
-
return (boolean)
if(kirby()->request()->ajax()) {
echo 'This is an ajax request';
}
Checks if this request is an Ajax request
if(kirby()->request()->ajax()) {
echo 'This is an ajax request';
}