Ship axios instead of vue-resource.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
/**
|
||||
* First we will load all of this project's JavaScript dependencies which
|
||||
* include Vue and Vue Resource. This gives a great starting point for
|
||||
* includes Vue and other libraries. It is a great starting point when
|
||||
* building robust, powerful web applications using Vue and Laravel.
|
||||
*/
|
||||
|
||||
|
||||
13
resources/assets/js/bootstrap.js
vendored
13
resources/assets/js/bootstrap.js
vendored
@@ -17,19 +17,14 @@ require('bootstrap-sass');
|
||||
*/
|
||||
|
||||
window.Vue = require('vue');
|
||||
require('vue-resource');
|
||||
|
||||
/**
|
||||
* We'll register a HTTP interceptor to attach the "CSRF" header to each of
|
||||
* the outgoing requests issued by this application. The CSRF middleware
|
||||
* included with Laravel will automatically verify the header's value.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
Vue.http.interceptors.push((request, next) => {
|
||||
request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken);
|
||||
|
||||
next();
|
||||
});
|
||||
window.axios = require('axios');
|
||||
|
||||
/**
|
||||
* Echo exposes an expressive API for subscribing to channels and listening
|
||||
|
||||
Reference in New Issue
Block a user