Installation
Require the package. The service provider is auto-discovered and the Contacts facade alias is registered for you:
composer require roundly-consulting/contacts-for-laravel
php artisan vendor:publish --tag="contacts-migrations"
php artisan migrateThe 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:
php artisan vendor:publish --tag="addresses-migrations"
php artisan vendor:publish --tag="connections-migrations"
php artisan migrateConfig 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>:
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 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.