afea/filament-files

File manager module for the Afea Filament CMS package ecosystem: uploaded files + external links, grouped and orderable.

Maintainers

Package info

github.com/AfeaSoftware/filament-files

pkg:composer/afea/filament-files

Statistics

Installs: 1

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-04-21 10:48 UTC

This package is auto-updated.

Last update: 2026-04-21 11:57:51 UTC


README

File manager module for the Afea Filament CMS package ecosystem.

Ships:

  • File model — unified listing of uploaded files (Spatie media) and external URLs
  • FileType enum (Upload / Link) with label + color + icon
  • Reorderable Filament v4 FileResource with a type-aware form (upload OR link, never both)
  • FilesPlugin + afea:install:files

Installation

composer require afea/filament-files
php artisan afea:install:files

Register in AdminPanelProvider:

->plugin(\Afea\Cms\Files\Filament\FilesPlugin::make())

Three common scenarios

1. Render a group of files on a Blade page

use Afea\Cms\Files\Models\File;

$brochures = File::query()->active()->inGroup('brochures')->ordered()->get();

// each file resolves to either a media URL or an external link
foreach ($brochures as $file) {
    $file->url(); // string|null
}

2. Store uploads on a private disk

AFEA_FILES_DISK=s3

The $file->url() helper keeps working — Spatie returns the disk's public URL. For signed/temporary URLs, call $file->getFirstMedia('file')?->getTemporaryUrl(...).

3. Group arbitrary external links alongside uploads

Create File records with type = link pointing at external PDFs or Google Drive sharing links — they'll appear in the same group alongside uploaded files.