Commit f2981650 authored by Martin Bastien's avatar Martin Bastien Committed by GitHub

Make axios compatible with Request::ajax()

It seems the library doesn't send the `X-Requested-With: XMLHttpRequest` header by default, if it's not present `$request->ajax()` always returns false.
parent 61b157f8
......@@ -25,6 +25,7 @@ window.Vue = require('vue');
*/
window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
/**
* Echo exposes an expressive API for subscribing to channels and listening
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment