Recently, I've started diving into the world of Vue.js and I'm curious about how to pass blade variables into it.
For instance:
return view('user.profile', ['locations' => $allLocations);
I want to be able to manipulate these variables using Vue.js. My goal is to create a dynamic dropdown menu system with two dropdowns. The second dropdown should show specific options based on what the user selects in the first dropdown.
I've experimented with a couple of methods like 1.) hiding elements and manipulating them with JavaScript, or 2.) making HTTP AJAX requests after the page loads to dynamically update the elements. However, I found both approaches messy and resource-intensive. Are there other, cleaner ways to achieve this functionality?
Thanks!