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
index()
Those who prefer to use laravel helpers they can check if a request is ajax using laravel request() helper.
request()
if(request()->ajax()) // code