Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/OswalSnow/AR-Barber/llms.txt

Use this file to discover all available pages before exploring further.

Before running AR Barbería for the first time, you need to configure your environment file. Laravel reads all runtime configuration from a .env file in the project root. Copy .env.example to .env, then fill in the values described on this page to match your local or production setup before running any migrations.

Copy the example file

If you used composer run setup, the setup script copies .env.example for you automatically. If you are configuring the environment manually, copy it yourself:
cp .env.example .env

Generate the application key

AR Barbería encrypts session data, cookies, and other sensitive values using APP_KEY. Generate it once after copying the environment file:
php artisan key:generate
Never reuse an APP_KEY across environments. Changing the key in production invalidates all existing encrypted session data.

Key environment variables

VariableDefaultDescription
APP_NAMELaravelThe application name displayed in emails and notifications. Set to AR Barbería.
APP_ENVlocalDeployment environment. Use local for development, production for live servers.
APP_KEY(empty)32-character encryption key. Generated by php artisan key:generate.
APP_DEBUGtrueShow detailed error pages. Must be false in production.
APP_URLhttp://localhostThe fully qualified URL of the application, used to generate absolute URLs.
DB_CONNECTIONsqliteDatabase driver. sqlite, mysql, or pgsql.
DB_HOST127.0.0.1Database server hostname. Only used for MySQL and PostgreSQL.
DB_PORT3306Database port. 3306 for MySQL, 5432 for PostgreSQL.
DB_DATABASElaravelDatabase name (or the path to the SQLite file for SQLite connections).
DB_USERNAMErootDatabase user.
DB_PASSWORD(empty)Database password.
FILESYSTEM_DISKlocalDefault filesystem disk. Set to public for portfolio image uploads.
SESSION_DRIVERdatabaseWhere sessions are stored. database is the default; redis is recommended for high traffic.
QUEUE_CONNECTIONdatabaseQueue backend. database works out of the box; switch to redis or sqs in production.

Database connection

DB_CONNECTION defaults to sqlite, which requires no additional server setup. The SQLite database file is created automatically when you run migrations. This is ideal for local development, automated tests, and quick demos.
For production deployments, switch to MySQL or PostgreSQL:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=arbarberia
DB_USERNAME=arbarberia_user
DB_PASSWORD=your_secure_password

Filesystem disk for portfolio images

AR Barbería stores portfolio images uploaded by barbers. To make uploaded files publicly accessible through the browser, set FILESYSTEM_DISK to public and create the storage symlink:
FILESYSTEM_DISK=public
After setting the disk, run the storage link command to symlink storage/app/public into public/storage:
php artisan storage:link
Run php artisan storage:link once per environment after the first deployment. On subsequent deploys you only need to run it again if the symlink was deleted.

Session and queue drivers

Both SESSION_DRIVER and QUEUE_CONNECTION default to database, which stores data in the sessions, jobs, and failed_jobs tables created by the framework migrations. No extra infrastructure is required for local development. For production servers with higher traffic, consider switching to redis for both drivers to reduce database load.

Production security checklist

APP_DEBUG=true leaks stack traces, environment variables, and configuration values to anyone who triggers an error. Always set APP_DEBUG=false before going live.
Before deploying to any publicly accessible server, verify these two values:
APP_ENV=production
APP_DEBUG=false

Build docs developers (and LLMs) love