Merge branch 'feature/vuejs' into feature/move-to-webpack

This commit is contained in:
Jakob Schrettenbrunner 2018-06-06 22:41:15 +02:00
commit cbdf4d4e1a
16 changed files with 270 additions and 232 deletions

View file

@ -0,0 +1,19 @@
/**
* 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.
*/
let axios = require('axios');
axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
axios.defaults.headers.common['Accept'] = 'application/json';
if (typeof phpdebugbar !== 'undefined') {
axios.interceptors.response.use(function (response) {
phpdebugbar.ajaxHandler.handle(response.request);
return response;
});
}
export default axios;