resources/js/bootstrap.js   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 0

Size

Lines of Code 20
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 13
c 0
b 0
f 0
dl 0
loc 20
rs 10
wmc 1
mnd 1
bc 1
fnc 0
bpm 0
cpm 0
noi 0
1
window._ = require('lodash');
2
window.Vue = require('vue');
3
4
// Setup AXIOS
5
window.axios = require('axios');
6
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
7
8
let token = document.head.querySelector('meta[name="csrf-token"]');
9
10
if (token) {
11
    window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
12
} else {
13
    console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
14
}
15
16
// Inject CSS
17
var link = document.createElement('link');
18
link.rel = 'stylesheet';
19
link.href = '/vendor/kustomer/css/kustomer.css';
20
document.head.appendChild(link);
21