Search by

voodflow / vmedia

Media Vault for the Voodflow plugin family (Filament 5 + Spatie Media Library). Standalone admin/API/galleries; integrates with VoodBuilder Asset Manager.

Maintainers

Package info

github.com/voodflow/vmedia

pkg:composer/voodflow/vmedia

Transparency log

Statistics

Installs: 26

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

0.2.8 2026-09-07 16:12 UTC

This package is auto-updated.

Last update: 2026-09-07 16:13:12 UTC


README

Media Vault for the Voodflow plugin family: one vault storage copy, many gallery memberships, morph attachments for your domain models.

Built on Filament 5 and Spatie Media Library. Works standalone (admin + HTTP API + public galleries). Integrates with VoodBuilder Asset Manager.

Quick start (5 minutes)

composer require voodflow/vmedia
php artisan vmedia:install

Register on the Filament panel:

->plugins([
    \Voodflow\Vmedia\VmediaPlugin::make(),
])

Attach media to a model:

use Voodflow\Vmedia\Concerns\HasAttachedMedia;

class Booth extends Model
{
    use HasAttachedMedia;
}

Upload in a Filament form:

use Voodflow\Vmedia\Filament\Forms\Components\VmediaFileUpload;

VmediaFileUpload::make('logo')
    ->collection('logo')
    ->image();

Pick existing vault media:

use Voodflow\Vmedia\Filament\Forms\Components\VmediaPicker;

VmediaPicker::make('gallery')
    ->collection('gallery')
    ->images()
    ->multiple();

Model

  • Vault — singleton Spatie owner of every file on disk (one storage copy)
  • Galleries — many-to-many membership (a photo/video/file can sit in several galleries)
  • Default gallery — only target for editor/frontend uploads; Choose can browse any gallery
  • AttachmentsHasAttachedMedia morph pivot (domain models never own Spatie collections)

Features

Area What you get
Admin Library + galleries, metadata (alt, caption, credits; video poster on videos), soft delete / trash
Picker VmediaPicker + VmediaFileUpload for other plugins
Files Photos, videos, and documents (PDF/Office/ZIP…)
Thumbs Spatie thumb conversion (WebP) for images
Usage Attachment counts; delete protected when media is in use
Duplicates SHA-256 reuse (optional)
ZIP import Bulk extract into the vault
Events MediaStored, MediaAttached, MediaDetached, MediaDeleted, MediaRestored
Stats Dashboard widget + php artisan vmedia:stats
Orphans php artisan vmedia:prune-orphans --force
Public GET /galleries/{slug} Blade gallery for is_public galleries

HTTP API (package-owned)

Method Path Role
GET /vmedia/media/galleries Gallery list + counts
GET /vmedia/media?page=&per_page=&gallery_id=&type=&q= Paginated assets (type: image|video|file)
POST /vmedia/media/upload Upload; optional gallery_id (folder/album — folders resolve to library album)
DELETE /vmedia/media/{media} Soft-delete (?force=1 force-deletes)

All routes require authentication (and optional Gate ability VMEDIA_ABILITY).

Config highlights

VMEDIA_ENABLED=true
VMEDIA_DISK=public
VMEDIA_CONVERSIONS=true
VMEDIA_DETECT_DUPLICATES=true
VMEDIA_PROTECT_DELETE=true
VMEDIA_PUBLIC_GALLERIES=true
VMEDIA_VOODBUILDER_EDITOR_ROUTES=true

Docs

License

MIT — see LICENSE.