How to check request is Ajax or not in Laravel 5?By Hardik Savani | August 13, 2016 | | 30216 Viewer | Category : Laravel Ajax
Sometimes, we need to check request is ajax or not in laravel 5. If you want to call same method but if request is ajax then you perform different, then you can do by using $request object.
In Laravel 5 $request object provide method to check request is ajax or not, In following example you can see how it's works.
You can check directly from Request facade and also from request object, both are same, so let's see bellow example.
public function index(Request $request)
public function index()
- How to get php.ini file path?
- How to check column exists or not in table Laravel 5
- How to change Bootstrap Datepicker with specific date format?
- How to create scroll to top of the page by jquery animate ?
- PHP - How to Convert file(image, audio, video) extension using CloudConvert API?
- Laravel 5 create and download zip file example using chumper/zipper composer package
- How to create blade view file using command line in Laravel?
- How to check if file exists or not in Laravel 5?