van-ons/filament-attachment-library
Filament Attachment Library adds a simple attachments manager to your Filament panel: upload files, browse and select existing attachments, and store them in a central library. Includes installer command, migrations/assets, and Tailwind-ready templates.
Storage facade), supporting disks like local, s3, or custom disks. This ensures flexibility in deployment (e.g., cloud storage for scalability).attachments table and a pivot table for model-attachment relationships. This is standard for Laravel and won’t disrupt existing schemas if scoped properly..env (e.g., ATTACHMENTS_DISK), glide.php, and attachment-library.php, reducing hardcoding.tailwind.config.js. Omitting this could break UI rendering.npm run build). CI/CD pipelines must account for this.basePath uses dynamic values (e.g., tenant slugs)?RichEditor, FileUpload).public/storage, S3 buckets, or custom solutions).Product, Post, User).Product) to test the AttachmentField and HasAttachments trait.install command to set up migrations and assets.request()->file()) with the package’s fields.<x-laravel-attachment-library-image> for displaying attachments.composer require glidephp/glide).filesystems.php and .env for the attachments disk.PanelProvider.HasAttachments trait to relevant models.gallery()) if needed.AttachmentField to Filament forms.mime(), multiple()).filament:upgrade Artisan command may need to be run post-update.Attachment::whereNotExists()->delete()).npm run build) after package updates or custom JS changes.filament-attachment-library:install --force to reinstall migrations/assets if corrupted.storage/logs/laravel.log for file upload errors (e.g., disk permissions).tailwind.config.js includes the package’s Blade paths.npm run dev) if JS fails to load.attachmentable_id and collection columns.glide:generate) to avoid blocking requests.sync queue driver for attachment processing if async is needed.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Disk full or inaccessible | Uploads fail, existing files lost | Set up monitoring (e.g., Laravel Horizon). |
| Database corruption (orphaned rows) | Inconsistent attachment relationships | Use soft deletes and regular database backups. |
| Glide misconfiguration | Broken image thumbnails | Test Glide routes (/glide/...) manually. |
| Tailwind/Alpine build failures | Broken UI | Ensure node_modules is intact; rebuild assets. |
| Concurrent uploads | File conflicts or corruption | Use unique filenames (e.g., |
How can I help you explore Laravel packages today?