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

gary.hanks@zygote.com's avatar

Purpose of bootstrap.js

What is the purpose of the file resources/assets/js/bootstrap.js? It doesn't appear to be referenced anywhere.

To my embarrassment, I spent several hours trying to figure out why 'requiring' additional javascript libraries in this file did not work.

0 likes
3 replies
jekinney's avatar

It is in app.js. Even has a comment explaining it.

gary.hanks@zygote.com's avatar

I found my own answer. In Spark's version of app.js the reference to bootstrap is replaced by two other "bootstrap" files, but the original bootstrap.js file is not cleaned up.

clay's avatar

Probably since the file is included with laravel, they don't remove it, though you're free to reference it yourself if you want. Spark, however, uses its own bootstrap file instead of this one.

1 like

Please or to participate in this conversation.