Created
          September 17, 2015 08:50 
        
      - 
      
- 
        Save milosh012/26900ae9f1f8960ab9e0 to your computer and use it in GitHub Desktop. 
    Forcing Laravel to recognise Angular request as Ajax
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // you can put this in angular "run" method | |
| // added this header so we can use Laravel Request::ajax() method on the backend | |
| $http.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment