iLeben is deployed on cPanel shared hosting by placing the Laravel project in a subdirectory (e.g.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/scooller/Leben-site/llms.txt
Use this file to discover all available pages before exploring further.
~/laravel) and pointing public_html at its public/ folder via a symlink. This keeps all application code outside the web root while preserving standard cPanel domain routing.
Requirements
- PHP 8.4+ — required by Laravel 12 and iLeben’s type signatures
- MySQL 8+ — used as the primary database
- Node.js 18+ — required to build the React frontend
- Composer 2.x — PHP dependency manager
Deployment Steps
Clone the repository
Clone the project into a directory inside your cPanel home folder. Using
laravel as the directory name keeps paths predictable.Install PHP dependencies
Install backend dependencies without development packages and with an optimised autoloader for production.
Create and configure the environment file
Copy the example file and generate a unique application key.Then open
.env and fill in all required values. See the Environment Variables reference below.Configure all environment variables
At minimum you must set
DB_*, the Salesforce SF_* block, and payment gateway credentials before running migrations. See the table in the Environment Variables section for the full list of groups.Run database migrations
Apply all schema migrations. The
--force flag is required when APP_ENV=production because Laravel will otherwise refuse to run migrations non-interactively.Build the React frontend
Install Node.js dependencies and produce a production build inside
frontend/dist/.Create the storage symlink
Expose the
storage/app/public directory so uploaded files are accessible from the web.Optimise for production
Cache configuration, routes, and views so Laravel skips file parsing on every request.
Remove the existing public_html directory
The symlink cannot be created if a
public_html directory (or symlink) already exists at the same path.Environment Variables
Configure.env by group. Every variable listed below maps to a key in .env.example.
Database
| Variable | Description | Example |
|---|---|---|
DB_CONNECTION | Driver (always mysql in production) | mysql |
DB_HOST | MySQL host | 127.0.0.1 |
DB_PORT | MySQL port | 3306 |
DB_DATABASE | Database name | ileben_ddbb |
DB_USERNAME | Database user | ileben_user |
DB_PASSWORD | Database password | •••••••• |
Salesforce
| Variable | Description |
|---|---|
SF_AUTH_METHOD | OAuth method — use WebServer for production |
SF_CONSUMER_KEY | Connected App consumer key |
SF_CONSUMER_SECRET | Connected App consumer secret |
SF_CALLBACK_URI | Must match the Connected App callback exactly |
SF_LOGIN_URL | https://login.salesforce.com |
SF_INSTANCE_URL | Your org’s My Domain URL |
SF_API_VERSION | API version (e.g. 57.0) |
Payments
| Variable | Description |
|---|---|
TRANSBANK_ENVIRONMENT | integration or production |
TRANSBANK_COMMERCE_CODE | Transbank commerce code |
TRANSBANK_API_KEY | Transbank API key |
TRANSBANK_MALL_MODE | true to enable Transbank Mall |
TRANSBANK_STORE_CODES | JSON map of store codes per project |
MERCADOPAGO_PUBLIC_KEY | Mercado Pago public key |
MERCADOPAGO_ACCESS_TOKEN | Mercado Pago access token |
MERCADOPAGO_WEBHOOK_SECRET | Signature secret for webhook verification |
App
| Variable | Description |
|---|---|
APP_NAME | Application name (displayed in the panel) |
APP_ENV | Must be production on live deployments |
APP_DEBUG | Must be false in production |
APP_URL | Canonical public URL (e.g. https://ileben.cl) |
FRONTEND_URL | React frontend URL |
CLOUDFLARE_TURNSTILE_SECRET_KEY | Server-side key for CAPTCHA validation |
| Variable | Description |
|---|---|
MAIL_MAILER | Driver — smtp, sendmail, etc. |
MAIL_HOST | SMTP host |
MAIL_PORT | SMTP port |
MAIL_USERNAME | SMTP username |
MAIL_PASSWORD | SMTP password |
MAIL_FROM_ADDRESS | Sender address |
MAIL_CC_CONTACT_SUBMISSION_ADMIN | Admin CC for contact submissions |
Queue
| Variable | Description |
|---|---|
QUEUE_CONNECTION | Must be database on cPanel (no Redis) |
SESSION_DRIVER | database recommended |
CACHE_STORE | database recommended |
After Each Deploy
Run
php artisan optimize:clear after every deploy to flush cached configuration, routes, and views before running php artisan optimize again. Do not run migrate:fresh on a live database — it drops all tables and destroys production data.