Appearance
Configuration
Environment Variables
Copy .env.example to .env and configure the following sections:
Application
ini
APP_NAME="LaraCommerce"
APP_ENV=production
APP_KEY=base64:... # generated by php artisan key:generate
APP_DEBUG=false
APP_URL=https://yourdomain.com
FRONTEND_URL=https://yourfrontend.comFRONTEND_URL is used in password reset and email verification links sent to customers.
Database
ini
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=ecommerce_db
DB_USERNAME=sail
DB_PASSWORD=passwordCache & Sessions
ini
CACHE_DRIVER=redis
SESSION_DRIVER=redis
QUEUE_CONNECTION=redis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=secret
REDIS_PORT=6379Mail
ini
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
MAIL_USERNAME=your@email.com
MAIL_PASSWORD=yourpassword
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS="noreply@yourstore.com"
MAIL_FROM_NAME="EcommerceAPI"Storage (MinIO / S3)
ini
AWS_ACCESS_KEY_ID=minioadmin
AWS_SECRET_ACCESS_KEY=minioadmin
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=ecommerce
AWS_ENDPOINT=http://minio:9000
AWS_USE_PATH_STYLE_ENDPOINT=trueFor AWS S3, remove AWS_ENDPOINT and AWS_USE_PATH_STYLE_ENDPOINT.
Stripe
ini
STRIPE_KEY=pk_live_xxxxx
STRIPE_SECRET=sk_live_xxxxx
STRIPE_WEBHOOK_SECRET=whsec_xxxxxGet these from your Stripe Dashboard.
Meilisearch
ini
SCOUT_DRIVER=meilisearch
MEILISEARCH_HOST=http://localhost:7700
MEILISEARCH_KEY=your-master-keyPush Notifications (Firebase FCM v1)
ini
FIREBASE_CREDENTIALS=firebase-service-account.jsonLaraCommerce uses the FCM v1 API (via kreait/laravel-firebase) instead of the deprecated legacy API.
Setup:
- Go to Firebase Console → Project Settings → Service accounts
- Click "Generate new private key" to download the JSON file
- Place the file at the project root (e.g.,
firebase-service-account.json) - Set
FIREBASE_CREDENTIALSin.envto the filename
The file is excluded from git via .gitignore. Push notifications are sent to mobile devices (iOS/Android) via Firebase Cloud Messaging. Users register their device tokens via POST /api/v1/user/push-token.
Proxy & Load Balancer
ini
TRUSTED_PROXIES=*Set this when running behind a reverse proxy (Nginx, Cloudflare, AWS ALB). The * trusts all proxies — in production, restrict to your proxy IP(s) for better security:
ini
TRUSTED_PROXIES=10.0.0.0/8,172.16.0.0/12This is required for correct HTTPS detection, signed URL validation (Livewire uploads), and client IP logging.
Multi-language & Currency
ini
APP_LOCALE=en
APP_FALLBACK_LOCALE=enSupported languages: en, fr, ar Supported currencies: USD, EUR, GBP, MAD, CAD, CHF, AED
Configure additional languages and exchange rates in the admin panel under Settings → Languages and Settings → Currencies.