Skip to main content

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.

All runtime configuration in Contacts DB is managed through a single .env file in the project root. The composer run setup script (or cp .env.example .env) creates this file from the included .env.example template during installation. You should never commit your .env file to version control — it contains secrets and environment-specific values that differ between machines. After editing any variable, no restart is needed for most settings, but changes to cached config require running php artisan config:clear.

App Settings

These variables control the core identity and behaviour of the Laravel application.
VariableDefaultDescription
APP_NAMELaravelThe display name of the application, used in emails and the UI.
APP_ENVlocalEnvironment name. Set to production on live servers.
APP_KEY(empty)32-character encryption key. Generated by php artisan key:generate. Never leave this empty.
APP_DEBUGtrueShows detailed error pages when true. Always set to false in production.
APP_URLhttp://localhostThe canonical URL of your installation, used in generated links and emails.

Database

Contacts DB defaults to SQLite, which requires no extra server or credentials. To switch to MySQL, MariaDB, or PostgreSQL, uncomment and fill in the relevant variables.
VariableDefaultDescription
DB_CONNECTIONsqliteDatabase driver. Accepts sqlite, mysql, mariadb, pgsql, or sqlsrv.
DB_HOST127.0.0.1Hostname of the database server (not used for SQLite).
DB_PORT3306Port of the database server. PostgreSQL uses 5432.
DB_DATABASEdatabase/database.sqliteDatabase name (MySQL/PostgreSQL) or file path (SQLite).
DB_USERNAMErootDatabase username (not used for SQLite).
DB_PASSWORD(empty)Database password (not used for SQLite).
When DB_CONNECTION=sqlite, Laravel stores all data in a single file at database/database.sqlite. This file is created automatically by the setup script — no database server, user, or password is needed. SQLite is ideal for local development and small single-server deployments.

Mail

The mail driver controls how outgoing emails (password resets, notifications) are delivered. The default log driver writes emails to your Laravel log files instead of actually sending them — useful during development.
VariableDefaultDescription
MAIL_MAILERlogMail transport. Options: smtp, sendmail, ses, postmark, resend, log, array.
MAIL_SCHEMEnullEncryption scheme for the SMTP connection. Set to tls or ssl when needed.
MAIL_HOST127.0.0.1SMTP server hostname (used when MAIL_MAILER=smtp).
MAIL_PORT2525SMTP server port. Common values: 587 (TLS), 465 (SSL), 25.
MAIL_USERNAMEnullSMTP authentication username.
MAIL_PASSWORDnullSMTP authentication password.
MAIL_FROM_ADDRESShello@example.comThe “From” address on all outgoing emails.
MAIL_FROM_NAME${APP_NAME}The “From” name on all outgoing emails. Defaults to APP_NAME.
With MAIL_MAILER=log (the out-of-the-box default), no emails are ever delivered to real inboxes. Email content is written to storage/logs/laravel.log instead. This is intentional for local development — switch to smtp or another real transport before going live.

Queue

Contacts DB uses Laravel’s database queue driver by default, which means queued jobs are stored in the jobs table and processed by the queue worker started via composer run dev (or php artisan queue:listen).
VariableDefaultDescription
QUEUE_CONNECTIONdatabaseQueue backend. Options: sync, database, redis, beanstalkd, sqs. Use sync to process jobs inline (no worker needed) during testing.

Session

VariableDefaultDescription
SESSION_DRIVERdatabaseWhere sessions are stored. Options: file, database, redis, cookie, array.
SESSION_LIFETIME120Number of minutes before an idle session expires.

Storage

VariableDefaultDescription
FILESYSTEM_DISKlocalDefault filesystem disk for storing uploaded files. Options: local, public, s3.

Admin Credentials

The AdminUserSeeder uses two variables that are not included in .env.example — you must add them manually before seeding. They are read through config/admin.php.
VariableDefaultDescription
ADMIN_EMAILadmin@example.comEmail address for the initial admin account.
ADMIN_PASSWORD(none)Password for the initial admin account. The seeder will not run if this is empty.
Add both to your .env file, then seed:
ADMIN_EMAIL=you@yourcompany.com
ADMIN_PASSWORD=a-strong-password-here
php artisan db:seed --class=AdminUserSeeder
The seeder creates the user with role = 'admin', which grants access to all routes protected by the role:admin middleware alias registered in bootstrap/app.php.

Switching from SQLite to MySQL

To use MySQL (or MariaDB) instead of the default SQLite, update your .env with the following block:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=contacts_db
DB_USERNAME=root
DB_PASSWORD=secret
Create the target database in MySQL if it does not already exist:
CREATE DATABASE contacts_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Then run the migrations to build the schema:
php artisan migrate

Running Migrations

Run pending migrations at any time with:
php artisan migrate
During development you can reset the entire database and re-run all migrations from scratch:
php artisan migrate:fresh
php artisan migrate:fresh drops every table in the database and recreates them from scratch. All data — including contacts, projects, tasks, and user accounts — will be permanently deleted. Never run this command against a database that holds data you want to keep.
After a fresh migration you will need to re-seed the admin user:
php artisan db:seed --class=AdminUserSeeder

Build docs developers (and LLMs) love