bootstrap.js 1.0 KB

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