Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork206
-
Trying to use Steps To Produce
Code Samplecollect($images)->each(function ($imageUrl)use ($productId) {$product = Product::find($productId);$product->addMediaFromUrl($imageUrl) ->toMediaCollection('images','s3');}); Did anyone ran into a similar issue, and found a solution around? Thanks in advance! |
BetaWas this translation helpful?Give feedback.
All reactions
Have you addedSpatie\MediaLibrary\MediaLibraryServiceProvider::class to your service providers inconfig/app.php? 🤔
My guess is that the config hasn't been loaded because the service provider isn't loaded, and that means thatmedia-library.file_namer isnull, sothis line is probably just resolvingapp() as the actual application.
Replies: 1 comment 3 replies
-
Have you added My guess is that the config hasn't been loaded because the service provider isn't loaded, and that means that |
BetaWas this translation helpful?Give feedback.
All reactions
-
You're totally right, I forgot about adding the service provider, in the Thank you for the help,@owenvoke! |
BetaWas this translation helpful?Give feedback.
All reactions
-
Yeah, unfortunately not. 😬 I have wanted to add auto-discovery, however there were some issues I remember. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I see! Thanks for all the hard work, and for this awesome project@owenvoke! |
BetaWas this translation helpful?Give feedback.