Download the PHP package dmitrybubyakin/nova-medialibrary-field without Composer
On this page you can find all versions of the php package dmitrybubyakin/nova-medialibrary-field. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dmitrybubyakin/nova-medialibrary-field
More information about dmitrybubyakin/nova-medialibrary-field
Files in dmitrybubyakin/nova-medialibrary-field
Package nova-medialibrary-field
Short Description Laravel Nova field for managing the Spatie media library.
License MIT
Homepage https://github.com/dmitrybubyakin/nova-medialibrary-field
Informations about the package nova-medialibrary-field
Medialibrary Field for Laravel Nova
Laravel Nova field for managing the Spatie media library.
This is the documentation for v2 and v3. For v1 follow this link
Features:
- add media on update/create views
- add existing media
- crop media
- sort media
- display on the index view
Table of Contents
- Screenshots
- Installation
- Usage
- Methods
- Attribute
- Fields
- AttachUsing
- ResolveMediaUsing
- AttachExisting
- MediaOnIndex
- DownloadUsing
- PreviewUsing
- Tooltip
- Title
- CopyAs
- Croppable
- Single
- Accept
- MaxSizeInBytes
- AttachOnDetails
- AttachRules
- Autouploading
- Preview Customization
- Validation
- Sorting
- Authorization Gates 'view', 'update' and 'delete'
- Methods
- Translations
- Changelog
- Alternatives
- License
Screenshots
Installation
This package can be installed via command:
Usage
Methods
Attribute
Sometimes you may need to use the same field label (duplicated sections, etc). The attribute must be unique. In this case you can change the default behaviour using the attribute()
method.
Fields
Define custom fields for media. MediaFields is used by default.
ResolveMediaUsing
AttachUsing
Called inside AttachCallback is used by default.
It accepts $fieldUuid
which is used when a resource is not created.
If you want to attach media on the create view, you should keep these lines in your callback.
AttachExisting
Allow attaching existing media.
MediaOnIndex
Display media on index
DownloadUsing
PreviewUsing
Tooltip
Title
CopyAs
Croppable
https://github.com/fengyuanchen/cropperjs#options
{note} If your media in different collection, make sure pass your collectionName to
performOnCollections
Single
Accept
MaxSizeInBytes
AttachOnDetails
Allows attaching files on the details view.
AttachRules
Autouploading
Preview Customization
Validation
Sorting
Authorization Gates 'view', 'update' and 'delete'
To view, update and delete uploaded media, you need to setup some gates. You can use the store and replace callbacks to store additional information to the custom_properties. The additional information can be used inside the gates for authorization.
You can also use the policy.
Translations
- de
- en
- fr
- pt-BR
- ru
- tr
- uk
- zh-CN
Changelog
Please see the CHANGELOG for more information about the most recent changed.
Alternatives
License
The MIT License (MIT). Please see License File for more information.
All versions of nova-medialibrary-field with dependencies
spatie/laravel-medialibrary Version ^11.0
spatie/laravel-data Version ^3.0