Configuration
DentControl uses Laravel’s robust configuration system to manage application settings. This guide covers environment configuration, database setup, and service configuration.Environment Variables
DentControl stores sensitive configuration in the.env file at the root of your project.
Generate application key
Generate a secure application key:This sets the
APP_KEY variable, which is used for encryption.Core Application Settings
Configuration Options
| Variable | Description | Default |
|---|---|---|
APP_NAME | Application name displayed throughout the app | Laravel |
APP_ENV | Environment (local, staging, production) | local |
APP_DEBUG | Enable debug mode (only for development) | true |
APP_URL | Base URL of your application | http://localhost |
BCRYPT_ROUNDS | Password hashing rounds (higher = more secure) | 12 |
Database Configuration
DentControl supports multiple database systems. By default, it uses SQLite for easy setup.SQLite (Default)
SQLite is perfect for development and small deployments. No additional database server required!
MySQL Configuration
MySQL
PostgreSQL Configuration
PostgreSQL
Session Configuration
DentControl stores sessions in the database for better scalability.Session Settings
| Variable | Description | Default |
|---|---|---|
SESSION_DRIVER | Where to store sessions (database, file, redis) | database |
SESSION_LIFETIME | Session lifetime in minutes | 120 |
SESSION_ENCRYPT | Encrypt session data | false |
Using
database as the session driver requires running migrations to create the sessions table.Cache Configuration
Caching improves application performance by storing frequently accessed data.Cache Settings
Available Cache Drivers
- database - Store cache in database (default)
- file - Store cache in filesystem
- redis - Use Redis for high-performance caching
- memcached - Use Memcached for distributed caching
Redis Configuration (Optional)
If using Redis for caching or queues:Redis
Queue Configuration
Queues allow you to defer time-consuming tasks for better performance.Queue Settings
Available Queue Drivers
- database - Store jobs in database (default, no extra setup)
- redis - Use Redis for faster queue processing
- sync - Execute jobs immediately (for development/testing)
To process queued jobs, you need to run the queue worker:
Mail Configuration
Configure email sending for notifications and password resets.Filesystem Configuration
Configure where uploaded files (like clinic logos) are stored.Filesystem
Available Disks
- local - Store files in
storage/app - public - Store files in
storage/app/public(accessible via public URL) - s3 - Store files on Amazon S3
Amazon S3 Configuration (Optional)
AWS S3
Logging Configuration
Configure how application logs are stored.Logging
Log Levels
- debug - Detailed information for debugging
- info - Interesting events
- warning - Exceptional occurrences that are not errors
- error - Runtime errors
In production, set
LOG_LEVEL=error to reduce log file size.Configuration Files
Laravel configuration files are located in theconfig/ directory:
| File | Purpose |
|---|---|
app.php | Core application settings |
auth.php | Authentication configuration |
database.php | Database connections |
mail.php | Email configuration |
cache.php | Cache stores |
queue.php | Queue connections |
session.php | Session configuration |
filesystems.php | File storage |
logging.php | Log channels |
Caching Configuration
For better performance in production, cache your configuration:After caching, changes to
.env won’t take effect until you run php artisan config:clear.Troubleshooting
Config changes not taking effect
Config changes not taking effect
If your configuration changes aren’t working:
-
Clear the config cache:
-
Clear all caches:
- Restart your web server or queue workers
Database connection errors
Database connection errors
For SQLite:
- Ensure
database/database.sqliteexists - Check file permissions (must be writable)
- Verify database server is running
- Check credentials in
.env - Ensure database exists:
CREATE DATABASE dentcontrol; - Test connection manually
Mail sending fails
Mail sending fails
- Check your SMTP credentials are correct
- Verify firewall allows outbound connections on mail port
- Test with
logdriver first to debug: - Check logs in
storage/logs/laravel.log
Permission denied errors
Permission denied errors
Ensure Laravel can write to these directories:
Next Steps
Database Setup
Run migrations and seed your database
User Management
Create users and assign roles
Deployment
Deploy to production