---
title: "Installation — Options for Laravel | Roundly"
description: "Install via Composer, publish and run the options table migration, and optionally publish the config to edit the registry or swap the model."
url: https://roundly-consulting.com/open-source/docs/options-for-laravel/installation
language: en
---

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

[Options for Laravel](https://roundly-consulting.com/open-source/docs/options-for-laravel.md)

# Installation

Require the package. The service provider and the Options facade alias are auto-discovered — no manual registration:

```bash
composer require roundly-consulting/options-for-laravel
```

Publish and run the migration:

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

## Publish-only migration

The migration is not loaded automatically — the package only publishes it. Until you publish it, php artisan migrate will not create the options table.

If the models that will own options use UUID or ULID primary keys, set the owner key type before you run the migration — the owner\_id column type is fixed when the table is created (see Database schema & key type):

```bash
# before you publish and run the migration
OPTIONS_KEY_TYPE=uuid   # bigint (default), uuid or ulid
```

## Config (optional)

The key type, cache, event, authorization and live-override settings are all env-backed. Publish the config when you want to swap the model or edit the registry, groups or config-bridge maps:

```bash
php artisan vendor:publish --tag="options-config"
```

The package’s publish tags are options-migrations and options-config.

## Next steps

- Define your first option by extending BaseOption — or scaffold one with make:option.
- Read and write it through the Options facade, the options() helper or the fluent API.
- Add the HasOptions trait to models that own their own settings.

## 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/options-for-laravel.md)
