# Laravel

> One-click Laravel with a production .env, database, scheduler and queue worker, and how to deploy your own Laravel app.

## One-click Laravel

Choose **Laravel** under **One-click apps** to get a fresh Laravel application in production mode:

- a PHP site on the newest PHP version installed on the server, served from `public/`,
- the official Laravel skeleton (`laravel/laravel`, current major version) deployed as a Git release: `composer install`, `php artisan migrate --force`, `storage:link`, `optimize`,
- a production `.env` with a fresh `APP_KEY`, `APP_ENV=production`, `APP_DEBUG=false`, daily logs, and database-backed sessions, cache and queue,
- a database: MariaDB or PostgreSQL when the server has one, otherwise SQLite in the shared directory,
- the **scheduler** (every minute) and **one queue worker**.

It is a starting point: point the site's [Git deploy](/docs/deploy-from-github) to your own repository when your app is ready.

## Deploy your own Laravel app

1. **Add site** with **Runs on: PHP** and the PHP version your app needs.
2. On **Deploy**, choose the **Laravel** preset and your repository. The preset sets the public directory (`public`), build commands and shared paths (`.env`, `storage`).
3. Write the `.env` (**Edit .env**, **Add APP_KEY**) and [connect a database](/docs/databases) to fill in `DB_*`.
4. **Deploy now**.

## Scheduler and queue workers

The **Deploy** pane of a Laravel site has **Scheduler (every minute)** — `php artisan schedule:run` as a cron entry — and **Queue workers**: the number of `php artisan queue:work` processes, run as [daemons](/docs/cron-and-daemons) that restart after every deploy. Click **Apply** after changing them.

## Artisan, logs and caching

- Run Artisan commands from the site's **Deploy** pane (**Run**), for example `cache:clear` or `migrate:status`.
- The **Logs** pane has a **Laravel** source for `storage/logs`.
- Turn on the **Object cache** to use Valkey for cache and sessions (`CACHE_STORE=redis`).
- Need WebSockets for Laravel Reverb? Add a `location` for it on the [nginx](/docs/custom-nginx) pane and run Reverb as a daemon.

---
Source: https://zefily.com/docs/laravel
