simplify csrf token retrieval. remove package.

This commit is contained in:
Taylor Otwell
2016-08-10 09:14:25 -05:00
parent e6cc60349d
commit 9c0278274b
2 changed files with 1 additions and 3 deletions

View File

@@ -1,6 +1,5 @@
window._ = require('lodash');
window.Cookies = require('js-cookie');
/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
@@ -27,7 +26,7 @@ require('vue-resource');
*/
Vue.http.interceptors.push(function (request, next) {
request.headers['X-XSRF-TOKEN'] = Cookies.get('XSRF-TOKEN');
request.headers['X-XSRF-TOKEN'] = Laravel.csrfToken;
next();
});