Dirk313's avatar

General Laravel /Vue Question

Hi all i have been woring with Laravel for a couple of months, i want to get more into vue as well because larval include some basic scaffolding of vue, so lets say you want to to upload a image using larval and want to display it in vue how would you go about that ? I have already used spatie to upload an image and works, but to display it breaks my brain a bit , i just want to create a simple SPA, any advise would be highly appreciated

0 likes
2 replies
baumanma's avatar
  • Make sure you choose the public folder in your upload process
  • Execute php artisan storage:link to create the symlinks from storage to your main public directory
  • now you can try to reach your picture with yourserver.com/your_imge.jpg. If this works just bind the source attribute of img in vue with this path

Hope it helps

1 like

Please or to participate in this conversation.