search

Home  >  Q&A  >  body text

Will Laravel determine whether the request is ajax?

Will Laravel determine whether the request is ajax?

世界只因有你世界只因有你2787 days ago453

reply all(1)I'll reply

  • 世界只因有你

    世界只因有你2017-05-16 16:56:10

    No,

    if(Request::ajax()){
        echo "AJAX";
    }

    Of course you can use middleware to uniformly handle ajax requests

    reply
    0
  • Cancelreply