Media gallery module for the Afea Filament CMS package ecosystem.
Ships:
MediaItemmodel — title + description + rich note + two media collections (image + downloadable file) via Spatie- Reorderable Filament v4
MediaItemResourcewith RichEditor (sharesafea-cms.rich_content.blocks) MediaPlugin+afea:install:mediainstaller
Pair this with afea/filament-files when you need:
filament-media— curated press kit / gallery items (1 image + 1 optional downloadable) with rich editorial notes.filament-files— flat document/link lists grouped by a stringgroup, no editorial metadata.
composer require afea/filament-media
php artisan afea:install:mediaRegister in AdminPanelProvider:
->plugin(\Afea\Cms\Media\Filament\MediaPlugin::make())use Afea\Cms\Media\Models\MediaItem;
$gallery = MediaItem::query()->active()->ordered()->get();
foreach ($gallery as $item) {
$item->imageUrl('preview'); // thumbnail
$item->imageUrl(); // original
$item->fileUrl(); // optional downloadable
}AFEA_MEDIA_DISK=s3-privateBoth image and file collections move to the new disk. For signed URLs use getFirstMedia('media/files')?->getTemporaryUrl(...).
class MediaItem extends \Afea\Cms\Media\Models\MediaItem
{
public function scopeFeatured($q)
{
return $q->active()->where('order', '<=', 6);
}
}'models' => ['media_item' => \App\Models\MediaItem::class],