bootstrap.js 1022 B

1234567891011121314151617181920212223242526272829303132
  1. window.Cookies = require('js-cookie');
  2. /**
  3. * We'll load jQuery and the Bootstrap jQuery plugin which provides support
  4. * for JavaScript based Bootstrap features such as modals and tabs. This
  5. * code may be modified to fit the specific needs of your application.
  6. */
  7. window.$ = window.jQuery = require('jquery');
  8. require('bootstrap-sass/assets/javascripts/bootstrap');
  9. /**
  10. * Vue is a modern JavaScript for building interactive web interfaces using
  11. * reacting data binding and reusable components. Vue's API is clean and
  12. * simple, leaving you to focus only on building your next great idea.
  13. */
  14. window.Vue = require('vue');
  15. require('vue-resource');
  16. /**
  17. * We'll register a HTTP interceptor to attach the "XSRF" header to each of
  18. * the outgoing requests issued by this application. The CSRF middleware
  19. * included with Laravel will automatically verify the header's value.
  20. */
  21. Vue.http.interceptors.push(function (request, next) {
  22. request.headers['X-XSRF-TOKEN'] = Cookies.get('XSRF-TOKEN');
  23. next();
  24. });