deka/media

Toolset for handling media (images and documents) in Laravel.

1.0 2022-07-28 05:24 UTC

This package is auto-updated.

Last update: 2024-05-16 13:04:35 UTC


README

GitHub Tests Action Status

This package makes adding media to your models a breeze. Just define the different types of media you whish to use and where to put them, add the Trait to the specified Models and you're ready to go!

Installation

You can install the package via composer:

composer require deka/media

You must publish the assets with:

php artisan vendor:publish --provider="Deka\Media\MediaServiceProvider" --tag="assets"

You can publish and run the migrations with:

php artisan vendor:publish --provider="Deka\Media\MediaServiceProvider" --tag="migrations"
php artisan migrate

You should publish the config file with:

php artisan vendor:publish --provider="Deka\Media\MediaServiceProvider" --tag="config"

This is the contents of the published config file:

return [
];

Usage

$laravel-media = new Deka\Media();
echo $media->echoPhrase('Hello, Deka!');

Testing

composer test

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email freek@spatie.be instead of using the issue tracker.

Credits

License

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