- How do I install Filament Mediazone in an existing Laravel Filament project?
- Run `composer require codezone/filament-mediazone`, then register the `MediaResource` in your `AdminPanelProvider.php` under the `panel()` method. Ensure Filament is installed (v2+) and your Laravel storage is configured. No additional frontend setup is needed as it uses Filament’s built-in UI components.
- Does Filament Mediazone support custom storage adapters like S3 or Azure?
- Yes, it leverages Laravel’s filesystem configuration, so you can use any supported adapter (local, S3, Azure, etc.) by defining the disk in `config/filesystems.php`. Just ensure the disk is set as the default or explicitly referenced in the package’s configuration if provided.
- Can I use Filament Mediazone alongside Spatie Media Library or Intervention Image?
- Technically possible, but not recommended due to potential conflicts like duplicate media models or storage paths. If migrating, assess whether Filament Mediazone’s Filament-native features justify replacing existing solutions. Test thoroughly in a staging environment to avoid data corruption.
- What Laravel and Filament versions does Filament Mediazone support?
- The package requires **PHP 8.1+**, **Laravel 9+**, and **Filament v2+**. Always check the package’s `composer.json` for exact version constraints, as breaking changes may occur with minor updates. For production, pin versions in `composer.json` to avoid unexpected updates.
- How do I customize upload rules or file types (e.g., allow only PDFs or limit size)?
- Use Filament’s resource customization to override the `MediaResource`. Modify the `getUploadedFileRules()` method or extend the resource class to define custom validation logic. For example, restrict to PDFs with `['mimes:pdf']` or limit size with `['max:10240']` (10MB).
- Does Filament Mediazone handle thumbnail generation automatically?
- Yes, it likely includes built-in thumbnail generation for supported image formats (e.g., JPEG, PNG). Thumbnails are generated on upload and stored in a subdirectory (e.g., `public/thumbnails/`). For custom sizes, override the thumbnail logic in the resource or configure it via the package’s settings if available.
- Is Filament Mediazone production-ready, or should I test it first?
- Given its low adoption (0 stars/dependents), treat it as a **beta-level package**. Test thoroughly in staging with your expected media volume (e.g., bulk uploads, large files). Monitor performance, especially for thumbnail generation, and have a backup plan for rollback if issues arise.
- Can I integrate Filament Mediazone with Laravel Backup for media asset recovery?
- Yes, since it uses Laravel’s filesystem, media assets will be included in backups if you configure the relevant disk in `spatie/laravel-backup`. Ensure the backup includes the storage path defined for media (e.g., `public/media/`). Restore by pointing the package’s storage config to the backup location post-restore.
- What are the alternatives to Filament Mediazone for Filament media management?
- For Filament-specific solutions, consider **Filament’s built-in file manager** (simpler) or **Spatie Media Library** (more feature-rich but non-Filament-native). If you need Filament integration without media-specific features, use **Filament’s `FileUpload` widget** with custom storage logic. For advanced use cases, combine Spatie Media Library with Filament’s UI components.
- How do I handle large media libraries (e.g., 10,000+ files) with Filament Mediazone?
- Optimize performance by configuring Laravel’s filesystem to use a fast disk (e.g., S3 with caching) and enabling queue-based thumbnail generation. For databases, ensure your `media` table has proper indexes (e.g., on `disk` or `mime_type`). Test pagination and lazy-loading in Filament’s grid view to avoid timeouts.