Download the PHP package outl1ne/nova-media-hub without Composer
On this page you can find all versions of the php package outl1ne/nova-media-hub. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package nova-media-hub
Nova Media Hub
This Laravel Nova package allows you to manage media and media fields.
Requirements
php: >=8.2laravel/nova: ^5.0
Other Versions
Features
- Media Hub UI in separate view
- Media Hub field for selecting single/multiple media
- Collection renaming from the collections list
- Image optimization and multiple conversions support
- File naming and path making customization
- Dark mode support
- A lot configuration options
- See the configuration file.
Screenshots
Installation
Install the package in a Laravel Nova project via Composer and run migrations:
Register the tool with Nova in the tools() method of the NovaServiceProvider:
Usage
Fields
This package provides a field MediaHubField which allows you to select media. This saves the media as a JSON array into the database.
Example usage:
Casting
The media column of models can be automatically cast as a Collection of Media models:
Configure
The config file can be published using the following command:
Renaming collections
Each collection in the Media Hub sidebar has an edit button that renames the collection and moves all of its media items along with it. Files on disk are stored under a path derived from the media ID, so nothing is moved on the disk and existing media URLs keep working.
Renaming is only available when user_can_create_collections is enabled in the config, since a rename
introduces a new collection name. Collections listed under the collections config key always exist and
can't be renamed, so they have no edit button.
Custom optimizer chain
You can define a custom optimizer chain or add items to it like so:
Localization
The translation file(s) can be published by using the following command:
Credits
License
Nova Media Hub is open-sourced software licensed under the MIT license.
All versions of nova-media-hub with dependencies
laravel/nova Version ^5.0
outl1ne/nova-translations-loader Version ^5.0
outl1ne/nova-translatable Version ^3.0
spatie/image Version ^3.0
spatie/image-optimizer Version ^1.7