Published 4 months ago by afoysal
I am trying to develop a SPA. In this regard I am using vue.js 2 in front end and Laravel 5.5 API in back end. Now I would like to display images in front end. I wrote below code in HTML
Where should I put images in Laravel and how can I access that image in vue.js ?
localhost:8000 is pointing to the
index.html file in
/public from your project root directory.
So to store the image, such that
localhost:8000/assets/images/default.jpg will work, it would have to sit in a directory:
You could also use a helper method with:
$url = asset('assets/images/default.jpg');