2019-03-05 00:06:04 +09:00
|
|
|
// jQuery
|
|
|
|
import './tissue';
|
2017-08-27 04:44:53 +09:00
|
|
|
|
2019-03-05 00:06:04 +09:00
|
|
|
// Setup global request header
|
2020-06-06 16:14:11 +09:00
|
|
|
const token = document.head.querySelector<HTMLMetaElement>('meta[name="csrf-token"]');
|
2019-03-05 00:06:04 +09:00
|
|
|
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');
|
2020-06-06 16:14:11 +09:00
|
|
|
} else {
|
|
|
|
$.ajaxSetup({
|
|
|
|
headers: {
|
2020-06-06 18:01:56 +09:00
|
|
|
'X-CSRF-TOKEN': token.content,
|
|
|
|
},
|
2020-06-06 16:14:11 +09:00
|
|
|
});
|
2017-08-27 04:44:53 +09:00
|
|
|
}
|
|
|
|
|
2019-03-05 00:06:04 +09:00
|
|
|
// Bootstrap
|
|
|
|
import 'bootstrap';
|