Components
Media Library
Integrations
Media Entry
In order to display items from the Media Library into a Filament infolist, the package provides a custom Filament infolist component called MediaEntry. This component can be used in any Filament schema, both inside or outside a Filament panel.
Using the entry
You can include the entry like this:
All methods available on the ImageEntry class are also available on the MediaEntry class:
Depending on which driver you are using, you will need to provide either the id of the MediaLibraryItem (if you are using the medialibrary driver) or the file path (if you are using the filesystem driver).
Relationship
If you are using the MediaLibraryItem driver and you have defined a relationship, you can also load the MediaLibraryItem using the relationship. You can do this by specifying the relationship name and using the ->relationship() method: