Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

Property Photos: Upload and Show URLs

Premium
11 min read

Now it's time to take care of the photos for the properties. Each property may have multiple photos, assign order position to them, and one of them should be marked "main". Simple, right?


Goals of This Lesson

  • Add photo upload feature with Spatie Laravel Media Library package
  • Endpoint to reorder the photos
  • Show photos in search results and property detail endpoints

By the end of this lesson, we will have this list of photos returned in Postman:


Preparing For Photo Upload

Personally, I'm a big fan of the package spatie/laravel-medialibrary to manage images. So we will try to use exactly that one...

The Full Lesson is Only for Premium Members

Want to access all of our courses? (29 h 14 min)

You also get:

54 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

G
groenewege ✓ Link copied!

Hi, the laravel-medialibrary package has a built-in ordering feature : https://spatie.be/docs/laravel-medialibrary/v10/advanced-usage/ordering-media

PK
Povilas Korop ✓ Link copied!

Wow, didn't know that! So cool that I learn in my courses, too. Definitely will have a YouTube video about it and will add information to this course lesson.