Jan 21, 2017
0
Level 33
Laravel Medialibrary
Hi,
I use Laravel Medialibrary from spatie.
I'm uploading my files like this:
foreach($request->file('attachment') as $image) {
$message->addMedia($image)
->toMediaLibrary();;
}
I know I can do this:
$mediaItems = $newsItem->getMedia();
but then I receive all media related to that Item. How do I get one specific file? Let's say I want to receive a file with id 1.
Please or to participate in this conversation.