comotic/laravel-medialibrary-generators

Collections of Path generators for Spatie laravel-medialibrary pacakge

1.0.0 2021-05-07 17:35 UTC

This package is auto-updated.

Last update: 2024-11-08 02:09:08 UTC


README

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

This is where your description should go. Try and limit it to a paragraph or two. Consider adding a small example.

Installation

You can install the package via composer:

composer require comotic/laravel-medialibrary-generators

Usage

If you haven't already done that, you must publish laravel-medialibray config file:

php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="config"

Then choose the generator that fits your needs and update the path_generator key of the config file.

That's it, profit!

Providers

  • UuidPathGenerator: Use Media's UUID instead of key to name the folder
  • SeparatedByModelPathGenerator: Group media by model type then by media id

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.