packy
321
4
Vue

Laravel Helpers in Vue

Posted 5 months ago by packy

So I prefer to make a lot of my front side with Vue as opposed to PHP. What I mean is if I have a list for instance, I will make a list component in Vue and not Blade @foreach so I can use components like "pull to refesh" or "infante scroll". I even prefer doing a whole front end in a Vue SPA these days. My question though is I still reach for some helpers from Laravel like storage to get the right URL to my files. What is the best practice for loading some of those nice helpers to Vue? Should I add a window variable to the head like window.storage = {{ Storage::url() }}

Please sign in or create an account to participate in this conversation.