Show Image Medias on Laravel + Vue 3 Inertia JS Frontend
Can someone tell me how to display media images on Vue's frontend? As far as I understand, if I use Blade PHP, I just need to call the images using . However, how do I implement the same functionality in Vue? Here is my code.
4 Replies
should i make a change in how i parse the data from the controller to Vue's props so that the images function can still be accessed?
You won't be able to call a PHP function on a Laravel model from vue, so you need to send the props you need yes. https://twillcms.com/docs/api/3.x/A17/Twill/Models/Behaviors/HasMedias.html#method_imagesAsArraysWithCrops would give you everything you need to work with the images in vue
GitHub
GitHub - Codivores/tutorial-laravel-twill-inertia-vue3-vite-tailwind
Contribute to Codivores/tutorial-laravel-twill-inertia-vue3-vite-tailwind development by creating an account on GitHub.
Codivores
Laravel / Twill / Inertia / Vite / Vue3 Composition API / TypeScrip...
Our attempt to build a CMS using Laravel and Twill for the back-end and Inertia with Vite, Vue 3 Composition API, TypeScript and Tailwind for the front-end.