Skip to main content

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.

iLeben ships with a set of custom Artisan commands alongside the standard Laravel toolkit. The sections below group every command by its operational area, explain what each one does, and call out the ones that can cause irreversible data loss.

App & Cache

# Display the current application state, environment, and loaded packages
php artisan about

# Flush all application caches (config, routes, views, events)
php artisan optimize:clear

# Cache config, routes, and views for production performance
php artisan optimize
Use optimize:clear whenever you change .env values, update routes, or modify config files. Always follow it with optimize before returning the site to normal traffic.

Database

# Apply pending migrations
php artisan migrate

# Display the status of every migration (applied / pending)
php artisan migrate:status

# Seed the database with initial or test data
php artisan db:seed
The commands below are destructive. They permanently modify or erase database content and cannot be undone without a backup. Always confirm APP_ENV and DB_CONNECTION before running them. Never run these against a production database without a full backup.
# Drop every table, view, and type in the current database
php artisan db:wipe

# Drop all tables then re-run every migration from scratch
php artisan migrate:fresh

# Drop all tables, re-run migrations, then seed the database
php artisan migrate:fresh --seed

# Revert the most recent batch of migrations
php artisan migrate:rollback

# Revert every migration (empties the schema)
php artisan migrate:reset

Salesforce Sync

# Sync projects from Salesforce into the local database
php artisan test:sync-projects

# Sync the plant catalogue from Salesforce
php artisan sync:plants

# Test the current Salesforce OAuth authentication
php artisan salesforce:test-auth

# Refresh the OAuth token and sync the backup stored in SiteSettings
php artisan salesforce:refresh-token
salesforce:refresh-token is also scheduled to run every 20 hours automatically. Run it manually after reconnecting OAuth to confirm the backup is current.For OAuth reconnection after an invalid_grant error, see the OAuth reconnection procedure in the README and run salesforce:test-auth to confirm authentication is healthy.

Contacts

# Preview which contact records would be normalised (no changes written)
php artisan contact:normalize-rango-renta-key --dry-run

# Normalise rango_renta keys across historical contact submissions
php artisan contact:normalize-rango-renta-key
Always run with --dry-run first to review the scope of changes before committing them.

Reservations & Payments

# Expire plant reservations that have passed their deadline
php artisan reservations:expire
This command is also registered in the scheduler and runs every minute automatically. Run it manually to force-expire reservations immediately.

FinMail

# Install the FinMail plugin tables and configuration
php artisan fin-mail:install

# Apply FinMail schema or data upgrades after package updates
php artisan fin-mail:upgrade

# Remove old sent-mail history records
php artisan fin-mail:cleanup
Run fin-mail:install once on first deploy. Run fin-mail:upgrade after updating the finity-labs/fin-mail package.

Activity Log & Command Runner

# Prune old activity log records (default retention per package config)
php artisan activitylog:clean

# Purge command runner history (default 30-day retention)
php artisan command-runner:purge-history

# Capture the exit code for a tracked command runner process (internal use)
php artisan command-runner:capture-status <id> <code>
command-runner:capture-status is called internally by the Filament Command Runner plugin. Do not call it manually unless instructed by support.

Testing

# Run the full test suite in compact output mode
php artisan test --compact

# Run a single test file
php artisan test --compact tests/Feature/SomeTest.php

# Run tests matching a specific name
php artisan test --compact --filter=testName
Tests use a dedicated sqlite_testing connection backed by database/testing.sqlite. This file must exist before running tests for the first time. See Monitoring & Testing for setup details.

Frontend

# Start the Vite dev server with hot-reload (development only)
cd frontend && npm run dev

# Produce a production build in frontend/dist/
cd frontend && npm run build
After running npm run build, the compiled assets in frontend/dist/ are served by the React frontend. You do not need to restart the Laravel server.

Safety Checklist for Destructive Commands

Before running any destructive database command (db:wipe, migrate:fresh, migrate:rollback, migrate:reset) verify the following:
  1. APP_ENV — confirm it is local or testing, not production.
  2. DB_CONNECTION and DB_DATABASE — confirm you are connected to the intended database, not the live production schema.
  3. Backup — ensure a recent database dump exists before proceeding.
In production, prefer php artisan optimize:clear to flush caches. Use migrations only to apply new schema changes, never to reset existing data.

Build docs developers (and LLMs) love