if(Request->ajax()){ echo "AJAX"; }else{ echo '普通请求';} 转载于:https://www.cnblogs.com/caicaizi/p/6086056.html