Configuration

Pivor is configured through environment variables in the .env file.

Application Settings

.env
APP_NAME=Pivor
APP_ENV=production
APP_DEBUG=false
APP_URL=https://your-domain.com
APP_NAME

Application name shown in the UI and emails

Default: Pivor

APP_ENV

Environment mode (local, staging, production)

Default: production

APP_DEBUG

Show detailed error messages (disable in production!)

Default: false

APP_URL

Full URL to your Pivor installation

Default: http://localhost

Database Configuration

Pivor supports SQLite, MySQL, and PostgreSQL.

SQLite

Default

Perfect for small installations. No additional setup required.

  • Zero configuration
  • Single file storage

MySQL

Production

Best for larger installations with high traffic.

  • Better concurrency
  • Advanced features

PostgreSQL

Production

Enterprise-grade with advanced data types.

  • Full ACID compliance
  • JSON support

SQLite Configuration

.env
DB_CONNECTION=sqlite
DB_DATABASE=/absolute/path/to/database.sqlite

MySQL Configuration

.env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=pivor
DB_USERNAME=pivor
DB_PASSWORD=secret

PostgreSQL Configuration

.env
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=pivor
DB_USERNAME=pivor
DB_PASSWORD=secret

Session & Cache

By default, Pivor uses the file driver for sessions and cache. For production, consider using Redis:

.env
SESSION_DRIVER=redis
CACHE_STORE=redis

REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=null

Mail Configuration

Configure email for notifications and reminders:

.env
MAIL_MAILER=smtp
MAIL_HOST=smtp.example.com
MAIL_PORT=587
MAIL_USERNAME=your-username
MAIL_PASSWORD=your-password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=pivor@your-domain.com
MAIL_FROM_NAME="Pivor CRM"

Common Mail Providers

Gmail
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_ENCRYPTION=tls
Mailgun
MAIL_MAILER=mailgun
MAILGUN_DOMAIN=mg.example.com
MAILGUN_SECRET=key-xxx
Amazon SES
MAIL_MAILER=ses
AWS_ACCESS_KEY_ID=xxx
AWS_SECRET_ACCESS_KEY=xxx

Gmail App Password Required

For Gmail with 2FA enabled, you need to create an App Password in your Google Account settings. Regular passwords won't work.

Email Integration OAuth

For Gmail and Outlook email sync (two-way), add OAuth credentials:

.env
# Gmail (Google Cloud Console)
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_CLIENT_SECRET=your-client-secret

# Outlook (Azure Portal)
MICROSOFT_CLIENT_ID=your-client-id
MICROSOFT_CLIENT_SECRET=your-client-secret
MICROSOFT_TENANT_ID=common

Queue Configuration

Background jobs (like email sync) run through Laravel's queue system:

Redis Queue

Best for production. Fast and reliable.

QUEUE_CONNECTION=redis

Database Queue

Good alternative. No extra dependencies.

QUEUE_CONNECTION=database

Don't forget to run a queue worker!

Background jobs won't process without a running worker:

php artisan queue:work

Caching for Production

After configuring your environment, cache the configuration for better performance:

1

Cache Configuration

php artisan config:cache
php artisan route:cache
php artisan view:cache

Clear Caches (when making changes)

php artisan config:clear
php artisan route:clear
php artisan view:clear

Next Steps