laravel判断HTTP请求是否ajax

if(Request->ajax()){
    echo "AJAX";
}else{
  echo '普通请求';
}
posted on 2016-11-21 16:58  caigan  阅读(5212)  评论(0编辑  收藏  举报