Periksa permintaan AJAX di Laravel
if($request->ajax()){
return "ajax request";
}
Isaac
if($request->ajax()){
return "ajax request";
}