tissue/resources/assets/js/bootstrap.js

18 lines
351 B
JavaScript
Raw Permalink Normal View History

// jQuery
import './tissue';
2017-08-27 04:44:53 +09:00
// Setup global request header
const token = document.head.querySelector('meta[name="csrf-token"]');
if (!token) {
2017-08-27 04:44:53 +09:00
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
}
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': token.content
}
});
2017-08-27 04:44:53 +09:00
// Bootstrap
import 'bootstrap';