Hello!
I have just begun using this great package, I am trying to build a gallery in Vue in which you can hover over thumbnails and show the hovered image in full resolution. In Laravel I can easily do $model->getMedia() and in each object do $media->getFullUrl(), however in Vue that is not possible, I could generate all the URLs in the controller and send it to Vue, but I was wondering what approach you would use.
Thanks for the help!
We generally use Laravel API resources to transform a model to the representation needed on the front end.
https://laravel.com/docs/5.6/eloquent-resources
So kind of similar to your approach, just structured in a different way :)
Hope this helps!
Most helpful comment
We generally use Laravel API resources to transform a model to the representation needed on the front end.
https://laravel.com/docs/5.6/eloquent-resources
So kind of similar to your approach, just structured in a different way :)
Hope this helps!