Laravel - check if Ajax request

后端 未结 11 831
梦谈多话
梦谈多话 2020-12-08 00:09

I have been trying to find a way to determine ajax call in Laravel but i don\'t find any document regarding it.

I have a index() function which i want t

11条回答
  •  旧时难觅i
    2020-12-08 00:25

    if(Request::ajax()) 
    

    Looks to be the right answer. http://laravel.com/api/5.0/Illuminate/Http/Request.html#method_ajax

提交回复
热议问题