The Contacts module is the core of Contacts DB. It stores every person and organisation your team tracks — from partners and speakers to stakeholders and prospects. Users with any role can view contacts; the admin and editor roles can create and update them; only admins can delete them or run bulk operations. Every record is structured around a rich set of fields that covers identity, contact details, classification, and free-text notes.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/0m1n3m/contacts-db/llms.txt
Use this file to discover all available pages before exploring further.
Data Model
Thecontacts table is created by migration 2026_04_20_132419_create_contacts_table. The table below documents every column.
| Field | Type | Required | Description |
|---|---|---|---|
id | bigint (auto-increment) | — | Primary key, assigned automatically. |
contact_category | string (varchar 255) | ✅ Yes | High-level classification of the contact (e.g. Partner, Donor, Media). Indexed. |
relationship_status | string (varchar 255) | ✅ Yes | Current status of the relationship (e.g. Active, Prospect, Lapsed). Indexed. |
use_for_events | boolean | No | Flag indicating this contact should be considered for event invitations. Defaults to false. |
potential_speaker | boolean | No | Flag indicating this contact is a potential event speaker. Defaults to false. |
organisation_name | string (varchar 255) | No | Name of the contact’s organisation or employer. Indexed. |
first_name | string (varchar 255) | No | Contact’s given name. Indexed. |
last_name | string (varchar 255) | No | Contact’s family name. Indexed. |
job_title | string (varchar 255) | No | Contact’s role or job title. |
emails | json (array) | No | One or more email addresses stored as a JSON array. |
phones | json (array) | No | One or more phone numbers stored as a JSON array. |
country | string (ISO 3166-1 alpha-2) | No | Two-letter ISO country code (e.g. GB, US, DE). Indexed. |
organisation_types | json (array) | No | Categories describing the type of organisation (e.g. NGO, University). |
keywords | json (array) | No | Thematic tags for the contact (e.g. climate, policy). |
relevant_project_programme | string (varchar 255) | No | Name of the project or programme this contact is linked to. |
expertise_speaking_topics | text (json array) | No | Areas of expertise or speaking topics, stored as a JSON array. |
stakeholder_type | string (varchar 255) | No | Stakeholder classification (e.g. Funder, Government, Civil Society). Indexed. |
comment | text | No | Free-text notes about the contact. |
created_at | timestamp | — | Set automatically by Laravel when the record is created. |
updated_at | timestamp | — | Updated automatically by Laravel on every save. |
JSON Array Fields
Five columns store multiple values as JSON arrays in the database. Laravel’s Eloquent model casts these columns automatically so they are always PHP arrays in application code:| Column | Cast |
|---|---|
emails | array |
phones | array |
organisation_types | array |
keywords | array |
expertise_speaking_topics | array |
Filtering
The contact list at/contacts supports both a global search parameter and per-column filters, all passed as URL query parameters.
Global search — q
The q parameter performs a broad LIKE search across all text columns simultaneously, including the JSON array columns. It also resolves country names — typing “Germany” matches contacts whose country field is DE.
Column filters
The following columns accept a textLIKE (partial match) filter via their query parameter:
| Parameter | Column | Match type |
|---|---|---|
contact_category | contact_category | Contains (case-insensitive) |
relationship_status | relationship_status | Contains |
first_name | first_name | Contains |
last_name | last_name | Contains |
organisation_name | organisation_name | Contains |
job_title | job_title | Contains |
country | country | Exact ISO code or partial country name |
relevant_project_programme | relevant_project_programme | Contains |
stakeholder_type | stakeholder_type | Contains |
comment | comment | Contains |
Boolean filters
| Parameter | Accepted values |
|---|---|
use_for_events | 1 / true / yes or 0 / false / no |
potential_speaker | 1 / true / yes or 0 / false / no |
JSON array filters
Theemails, phones, keywords, organisation_types, and expertise_speaking_topics parameters search inside the stored JSON string, matching contacts whose array contains an element equal to the supplied value.
Sorting
Thesort parameter accepts any column from the allowed list, and dir accepts asc or desc. String columns are sorted case-insensitively with leading spaces trimmed. The default sort is updated_at descending.
Sortable columns: contact_category, relationship_status, use_for_events, potential_speaker, organisation_name, first_name, last_name, job_title, country, relevant_project_programme, stakeholder_type, created_at, updated_at.
Access Control
Contacts DB enforces role-based access on every contact route. The three roles and their permissions are:| Action | Admin | Editor | Viewer |
|---|---|---|---|
View contact list (GET /contacts) | ✅ | ✅ | ✅ |
View contact detail (GET /contacts/{id}) | ✅ | ✅ | ✅ |
Create contact (GET/POST /contacts/create) | ✅ | ✅ | ❌ |
Edit contact (GET /contacts/{id}/edit, PATCH /contacts/{id}) | ✅ | ✅ | ❌ |
Delete single contact (DELETE /contacts/{id}) | ✅ | ❌ | ❌ |
Bulk delete (POST /contacts/bulk-destroy) | ✅ | ❌ | ❌ |
Export selected contacts (POST /contacts/export) | ✅ | ✅ | ✅ |
Import contacts (GET /contacts/import, POST /contacts/import/preview, POST /contacts/import/run) | ✅ | ✅ | ❌ |
The viewer role is any authenticated user who is not assigned the
admin or editor role. Export is available to all authenticated users — no special role is required.Managing Contacts
Learn how to create, edit, search, and delete contacts from the UI and via direct HTTP routes.
Import & Export
Bulk-import contacts from CSV or Excel files and export selected records to CSV.