lyre/file
最新稳定版本:1.2.14
Composer 安装命令:
composer require lyre/file
包简介
File management with filament
关键字:
README 文档
README
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 Content depends on Lyre and Laravel Filament. To complete installation, especially if your require the functionalities from Laravel Filament, 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([ new LyreFileFilamentPlugin(), ]);
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()
统计信息
- 总下载量: 196
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-04