bootstrap.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. window._ = require('lodash');
  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. try {
  8. window.$ = window.jQuery = require('jquery');
  9. require('bootstrap-sass');
  10. } catch (e) {}
  11. /**
  12. * We'll load the axios HTTP library which allows us to easily issue requests
  13. * to our Laravel back-end. This library automatically handles sending the
  14. * CSRF token as a header based on the value of the "XSRF" token cookie.
  15. */
  16. window.axios = require('axios');
  17. window.axios.defaults.headers.common['X-CSRF-TOKEN'] = window.Laravel.csrfToken;
  18. window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
  19. /**
  20. * Echo exposes an expressive API for subscribing to channels and listening
  21. * for events that are broadcast by Laravel. Echo and event broadcasting
  22. * allows your team to easily build robust real-time web applications.
  23. */
  24. // import Echo from 'laravel-echo'
  25. // window.Pusher = require('pusher-js');
  26. // window.Echo = new Echo({
  27. // broadcaster: 'pusher',
  28. // key: 'your-pusher-key'
  29. // });