You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using getFirstMediaUrl, you should use a scope to filter your request and select only the first record in the database.
It's not a good practice to get everything and filter the collection.
Imagine my model has 1000 images, you take everything for only one record.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When using getFirstMediaUrl, you should use a scope to filter your request and select only the first record in the database.
It's not a good practice to get everything and filter the collection.
Imagine my model has 1000 images, you take everything for only one record.
Beta Was this translation helpful? Give feedback.
All reactions