farzai/laravel-nova-media

This is my package laravel-nova-media

0.1.0 2023-06-04 05:53 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status codecov Total Downloads

This package is a Laravel Nova field for managing media files via Spatie Media Library.

Requirements

Installation

You can install the package via composer:

composer require farzai/laravel-nova-media

Usage

use Farzai\NovaMedia\Fields\Media;

class Post extends Resource
{
    // ...

    public function fields(Request $request)
    {
        return [
            // ...

            Media::make('Images', 'cover')
                ->previewConversionName('preview')
                ->thumbnailConversionName('thumb'),
        ];
    }
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.