型を付ける音「カタカタ...」
This commit is contained in:
17
resources/assets/js/bootstrap.ts
Normal file
17
resources/assets/js/bootstrap.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
// jQuery
|
||||
import './tissue';
|
||||
|
||||
// Setup global request header
|
||||
const token = document.head.querySelector<HTMLMetaElement>('meta[name="csrf-token"]');
|
||||
if (!token) {
|
||||
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
|
||||
} else {
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': token.content
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Bootstrap
|
||||
import 'bootstrap';
|
||||
Reference in New Issue
Block a user