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.
| Variable | Default | Description |
|---|
APP_NAME | Laravel | The display name of the application, used in emails and the UI. |
APP_ENV | local | Environment 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_DEBUG | true | Shows detailed error pages when true. Always set to false in production. |
APP_URL | http://localhost | The 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.
| Variable | Default | Description |
|---|
DB_CONNECTION | sqlite | Database driver. Accepts sqlite, mysql, mariadb, pgsql, or sqlsrv. |
DB_HOST | 127.0.0.1 | Hostname of the database server (not used for SQLite). |
DB_PORT | 3306 | Port of the database server. PostgreSQL uses 5432. |
DB_DATABASE | database/database.sqlite | Database name (MySQL/PostgreSQL) or file path (SQLite). |
DB_USERNAME | root | Database 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.
| Variable | Default | Description |
|---|
MAIL_MAILER | log | Mail transport. Options: smtp, sendmail, ses, postmark, resend, log, array. |
MAIL_SCHEME | null | Encryption scheme for the SMTP connection. Set to tls or ssl when needed. |
MAIL_HOST | 127.0.0.1 | SMTP server hostname (used when MAIL_MAILER=smtp). |
MAIL_PORT | 2525 | SMTP server port. Common values: 587 (TLS), 465 (SSL), 25. |
MAIL_USERNAME | null | SMTP authentication username. |
MAIL_PASSWORD | null | SMTP authentication password. |
MAIL_FROM_ADDRESS | hello@example.com | The “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).
| Variable | Default | Description |
|---|
QUEUE_CONNECTION | database | Queue backend. Options: sync, database, redis, beanstalkd, sqs. Use sync to process jobs inline (no worker needed) during testing. |
Session
| Variable | Default | Description |
|---|
SESSION_DRIVER | database | Where sessions are stored. Options: file, database, redis, cookie, array. |
SESSION_LIFETIME | 120 | Number of minutes before an idle session expires. |
Storage
| Variable | Default | Description |
|---|
FILESYSTEM_DISK | local | Default 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.
| Variable | Default | Description |
|---|
ADMIN_EMAIL | admin@example.com | Email 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:
Running Migrations
Run pending migrations at any time with:
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