Support the ongoing development of Laravel.io →
Database Views Packages

I am uploading my images to S3 using Flysystem.

In my database I keep only the file name (image.jpg)

Now, I was thinking of implementing Presenters to fetch the file public URL so that I can set it as image src in HTML. Something like

$image->present()->publicURL;

I am using laracasts/presenter for that.

The problem is that I don't know how to fetch the public URL of the file.

Can anyone help me with this?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

mabasic mabasic Joined 3 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.