Skip to content

Simplifies and enhances the use of Laravel Nova Trix file attachments

Notifications You must be signed in to change notification settings

netsells/laravel-nova-trix-attachments

Repository files navigation

Laravel Nova Trix Attachments

Simplifies and enhances the use of Laravel Nova Trix file attachments by providing the required migrations and scheduled command out of the box as well as a rule to validate allowed file MIME types.

Features

Use rule TrixFileAttachmentRule to validate an array of allowed file MIME types patterns.

use Laravel\Nova\Fields\Trix;
use Netsells\LaravelNovaTrixAttachments\TrixFileAttachmentRule;

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

        Trix::make('Field')->rules([new TrixFileAttachmentRule(['image/*'])]),
    ];
}

Installation

Install the package with:

composer require netsells/laravel-nova-trix-attachments

Testing

./vendor/bin/phpunit

About

Simplifies and enhances the use of Laravel Nova Trix file attachments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published