Home > Q&A > body text
Will Laravel determine whether the request is ajax?
世界只因有你2017-05-16 16:56:10
No,
if(Request::ajax()){ echo "AJAX"; }
Of course you can use middleware to uniformly handle ajax requests
middleware