---
title: "Installation — Attributes for Laravel | Roundly"
description: "Install via Composer, publish and run the two publish-only migrations, and optionally publish the config file."
url: https://roundly-consulting.com/open-source/docs/attributes-for-laravel/installation
language: en
---

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

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

# Installation

Require the package. The service provider is auto-discovered — no manual registration:

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

Publish the migrations, then run them:

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

## Publish-only migrations

The package never loads its migrations for you. Publishing copies two timestamped files — the attributes table and the attribute\_revisions audit table — into your app’s database/migrations, where you own them and can adjust the schema before migrating.

If your owner models use UUID or ULID keys, publish the config and set key\_type before you migrate — the owner columns are typed when the migrations run (see Database schema & model).

Optionally publish the config file:

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

The only publish tags the package exposes are attributes-migrations and attributes-config.

## Next steps

- Add the HasAttributes trait and contract to a model.
- Attach your first typed attribute with Attributes::for($model)->set().
- Register definitions when you want validation, defaults or constraints.

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