Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel check request is ajax

         /**       
         * Display a listing of the resource.
         *
         * @param  IlluminateHttpRequest $request
         * @return Response
         */
        public function index(Request $request)
        {
            if($request->ajax()){
                return "AJAX";
            }
            return "HTTP";
        }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #check #request #ajax
ADD COMMENT
Topic
Name
8+5 =