Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

farhanrashid's avatar

why axios in bootstrap.js?

Hello guys, I am new to Laravel. I installed laravel 10, and by default app.js is importing bootstrap.js, and bootstrap.js is importing axios. I am not using any node library, just php and alpine js. Do I still need axios? or axios is helpful in any other way if I am not using node js.

import axios from 'axios';

window.axios = axios;

window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';

0 likes
1 reply
MohamedTammam's avatar

It's just there as a starter template. Feel free to delete it if you don't use it.

Please or to participate in this conversation.