$request->ajax()

Checks if this request is an Ajax request

  • return (boolean)
if(kirby()->request()->ajax()) {
  echo 'This is an ajax request';
}

Is something missing or incorrect? Edit this page on Github…