---
title: "Installation — Contacts for Laravel | Roundly"
description: "Install via Composer, publish the contacts migrations and the two companion migrations, then optionally publish config and translations."
url: https://roundly-consulting.com/open-source/docs/contacts-for-laravel/installation
language: en
---

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

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

# Installation

Require the package. The service provider is auto-discovered and the Contacts facade alias is registered for you:

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

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

The migrations are publish-only — the package never runs them for you. contacts-migrations publishes two files, in order: create\_contacts\_table and update\_contacts\_table\_with\_one\_primary\_per\_kind, the one-primary index (see Database schema). An install that already published create\_contacts\_table runs the same publish command again: the published copy is recognised, only the new file is added, and php artisan migrate runs it.

Each migration lands as a timestamped file you own. Re-publishing an unedited copy (with --force) overwrites it in place instead of adding a second one; a copy you edited — or any other same-named migration — is never overwritten: the package’s migration is published beside it under a fresh timestamp, and you decide which one to keep.

## Companion migrations

Composer pulls in addresses-for-laravel and connections-for-laravel automatically. Every Contact carries a structured address book and relationship edges through them, and deleting a contact cleans both up — so publish and run their migrations as well:

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

## Config and translations

Both are optional — every config key has a default, and the type labels and error messages ship in English and Slovak. Publish only to override, or to add another language under lang/vendor/contacts/<locale>:

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

The publish tags are contacts-migrations, contacts-config and contacts-translations.

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