# Laravel backend deployment

1. Point the API subdomain or `/api` backend document root to this folder's `public` directory.
2. Run `composer install --no-dev --optimize-autoloader` on the host.
3. Copy `.env.example` to `.env` and configure the database, frontend URL, mail, Microsoft Graph, and a strong initial admin password.
4. Run `php artisan key:generate`, `php artisan migrate --force`, and `php artisan db:seed --class=AdminUserSeeder --force`.
5. Make `storage` and `bootstrap/cache` writable by the PHP user.
6. Run `php artisan config:cache`, `php artisan route:cache`, and `php artisan view:cache`.
7. Never expose `.env`, `storage`, or the project root through the web server.

The `vendor` directory is intentionally not included. Install production dependencies on the host so platform-specific packages match the hosting PHP runtime.
