How to check request is Ajax or not in Laravel 5?By Hardik Savani | August 13, 2016 | | 24867 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()
- Angular $scope.form value undefined on submit in ionic framework.
- Full Text Search in Laravel 5 Example
- Laravel 5 Localization(trans helper) tutorial example
- Solve - no connection could be made target machine actively refused it laravel
- How to get minimum key value of array in PHP?
- How to increase upload file size limit PHP in Ubuntu?
- PHP - How to make dependent dropdown list using jquery Ajax?
- How to add ckeditor with image upload in Laravel ?