Include Custom Javascript file into blade view using Vite

While Laravel 10 no longer includes Laravel Mix by default, you can still leverage its functionalities for asset management with a few adjustments. For example, In Laravel 10, to add a JavaScript library to your Blade view, you can directly specify its path in the vite.config.js. Which tells the Vite to process the file for production mode.

Select Box Change Dependent Options dynamically (JavaScript Object)

There are different solutions you can find that shows how to change/load the content in child <SELECT> element, depending on the selection of the parent <SELECT> options. Most examples uses Ajax or page refresh methods to achieve, which of-course are useful depending on the circumstance. But if you wish to use another simple method using pure JavaScript, here’s how you can do it.