---
title: "Installation — Media Library for Laravel | Roundly"
description: "Install via Composer, publish the migration, and optionally publish the config and the streaming route file."
url: https://roundly-consulting.com/open-source/docs/media-library-for-laravel/installation
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[Media Library for Laravel](https://roundly-consulting.com/open-source/docs/media-library-for-laravel.md)

# 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:

```bash
composer require roundly-consulting/media-library-for-laravel

php artisan vendor:publish --tag="media-migrations"
php artisan migrate
```

The config file is optional — every key has an env-backed default. Publish it only to override:

```bash
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:

```bash
php artisan vendor:publish --tag="media-routes"
```

The publish tags the package exposes are media-migrations, media-config, media-routes and media-translations — the SafeRemoteUrl rule’s English and Slovak messages, which load under the media:: namespace without publishing.

## 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 crypto](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## 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.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/media-library-for-laravel.md)
