deka / media
Toolset for handling media (images and documents) in Laravel.
Requires
- php: ^8.0
- ext-json: *
- intervention/image: ^2.5
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- orchestra/testbench: ^5.0
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2025-03-16 14:35:20 UTC
README
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.