Update bootstrap.js
This commit is contained in:
parent
242a0483b8
commit
7d152a7b54
2 changed files with 9 additions and 9 deletions
9
resources/assets/js/bootstrap.js
vendored
9
resources/assets/js/bootstrap.js
vendored
|
@ -5,3 +5,12 @@ window.$ = window.jQuery = require('jquery');
|
|||
require('bootstrap');
|
||||
window.typeahead = require('./lib/typeahead');
|
||||
window.Bloodhound = require('./lib/bloodhound');
|
||||
window.axios = require('axios');
|
||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
||||
let token = document.head.querySelector('meta[name="csrf-token"]');
|
||||
if (token) {
|
||||
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
|
||||
} else {
|
||||
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue