creode/nova-media
最新稳定版本:1.4.0
Composer 安装命令:
composer require creode/nova-media
包简介
README 文档
README
Simple Nova resource which will work like a media library, allowing you to store different media items.
Installation
You can install this package with the following command:
composer require creode/nova-media
You also need to run the migrations which will create a new media table:
php artisan migrate
Usage
Render the field by id within blade:
@include('nova-media::media', ['id' => $id])
Media Field
You can also use the media field within your Nova resource:
MediaField::make('Media')
This will automatically create a select box which will allow you to select a media item.
Configuration
You can configure which filesystem disk to use for the media library by publishing the config file:
php artisan vendor:publish --tag="nova-media-config"
And overwriting the disk parameter, alternatively you can set the NOVA_MEDIA_DISK environment variable.
Publishing Views
You can publish the views for this package by running the following command:
php artisan vendor:publish --tag="nova-media-views"
This will add a new view into the resources/views/vendor/nova-media directory which you can edit to change the way the media is displayed.
统计信息
- 总下载量: 33
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2023-11-21