lyre/file
Lyre File
Lyre File is a Lyre addon for simple Media Management. It comes with the following predefined models to help you manage your media content:
- File - This defines the actual media file
- Attachment - This is a morph model defining your relationships to your media files
Installation
composer require lyre/file
Publish Assets
php artisan vendor:publish --provider="Lyre\File\Providers\LyreFileServiceProvider"
After installation, add the HasFile trait to all the relevant models:
use Lyre\File\Concerns\HasFile;
use HasFile;
Dependencies
Lyre File depends on Lyre and Laravel Filament. To complete installation, especially if you require Filament functionality, follow these additional commands:
php artisan filament:install --panels
To create an admin user:
php artisan make:filament-user
Discover Content Filament Resources
To Discover Lyre File Filament Resources on your Filament dashboard, add the LyreFileFilamentPlugin to your Filament panel like so:
use Lyre\File\Filament\Plugins\LyreFileFilamentPlugin;
$panel->plugins([
LyreFileFilamentPlugin::make(),
]);
SelectFromGallery Custom Field
Lyre File comes with a custom field to select files from gallery. You may define whether or not your model has multiple files. By default, your model will only have one file.
use Lyre\File\Filament\Forms\Components\SelectFromGallery;
SelectFromGallery::make('files')->label('Featured Images')->multiple()
Related Packages
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| 1.7.0 | ^8.3 | MIT | |
| 1.6.0 | ^8.3 | MIT | |
| 1.5.0 | ^8.3 | MIT | |
| 1.4.6 | ^8.3 | MIT | |
| 1.4.5 | ^8.3 | MIT | |
| 1.4.4 | ^8.3 | MIT | |
| 1.4.3 | ^8.3 | MIT | |
| 1.4.2 | ^8.3 | MIT | |
| 1.4.1 | ^8.2 | MIT | |
| 1.4.0 | ^8.2 | MIT | |
| 1.3.0 | ^8.2 | MIT | |
| 1.2.14 | ^8.2 | MIT | |
| 1.2.13 | ^8.2 | MIT | |
| 1.2.12 | ^8.2 | MIT | |
| 1.2.11 | ^8.2 | MIT | |
| 1.2.10 | ^8.2 | MIT | |
| 1.2.9 | ^8.2 | MIT | |
| 1.2.8 | ^8.2 | MIT | |
| 1.2.7 | ^8.2 | MIT | |
| 1.2.6 | ^8.2 | MIT | |
| 1.2.5 | ^8.2 | MIT | |
| 1.2.4 | ^8.2 | MIT | |
| 1.2.3 | ^8.2 | MIT | |
| 1.2.2 | ^8.2 | MIT | |
| 1.2.1 | ^8.2 | MIT | |
| 1.2.0 | ^8.2 | MIT | |
| 1.1.0 | ^8.2 | MIT | |
| 1.0.1 | ^8.2 | MIT | |
| 1.0.0 | ^8.2 | MIT |