Installation
Require the package, then publish and run the migration. The migration is publish-only — the package never loads it, so a bare php artisan migrate won't create the media table until you publish it. The service provider is auto-discovered:
composer require roundly-consulting/media-library-for-laravel
php artisan vendor:publish --tag="media-migrations"
php artisan migrateThe config file is optional — every key has an env-backed default. Publish it only to override:
php artisan vendor:publish --tag="media-config"The package registers its signed streaming route for you (unless media.stream.enabled is false). Publish the route file only if you want to edit it:
php artisan vendor:publish --tag="media-routes"The publish tags the package exposes are media-migrations, media-config and media-routes.
Show your open-source love
This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.
More ways to support, including cryptoBy donating, you agree to our donation terms.
Want this built into your product?
We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.