Lars-Janssen's avatar

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.

0 likes
0 replies

Please or to participate in this conversation.