RJA's avatar
Level 1

Store Image Url into database and get image url and display in table

Hi everyone,

I'm trying to upload an image url, the location of an image (not the image itself) into the database.

So in my table, i have a column of type varchar which will receive an url like : http://laraveldaily.com/wp-content/uploads/2015/06/laravel-logo-big.png

Programs:

  • id
  • name
  • image_url

What i want, is a way to get the url from the database and display the image on my table view.

Like:

  • Header - Image URL

  • image preview

  • Header - Name

  • Program Name

So, basically i wouldn't need to either store the image in my storage folder nor on the database, i could just have an online repository and get the images from there.

Does anyone knows how i can do this?

Regards

0 likes
2 replies
tykus's avatar
tykus
Best Answer
Level 104

Am I missing some complexity here???

<img src="{{ $program->imageUrl }}">
1 like
RJA's avatar
Level 1

I thought i had to use intervention image or Laravel's Filesystem, since i came upon several people trying to save images onto the database, and that is what is being shown on videos.

Thanks @tykus

Please or to participate in this conversation.