Skip to content

Instantly share code, notes, and snippets.

@oshosanya
Last active April 6, 2020 09:32
Show Gist options
  • Save oshosanya/f22f55858cf68471923ac1742f04e664 to your computer and use it in GitHub Desktop.
Save oshosanya/f22f55858cf68471923ac1742f04e664 to your computer and use it in GitHub Desktop.
/**
* We'll load the axios HTTP library which allows us to easily issue requests
* to our Laravel back-end. This library automatically handles sending the
* CSRF token as a header based on the value of the "XSRF" token cookie.
*/
window.axios = require('axios');
window.axios.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