Laravel local development with Short Leash
On this page
Short Leash serves any Laravel app at https://<name>.test as soon as its folder is parked or linked, and can create a new one set up for its PHP, database and mail in one step.
How do I create a new Laravel app?
Sites › New Laravel site creates a fresh Laravel app and sets it up to use Short Leash's PHP, database and mail.
- Type a name. The site will be served at
https://<name>.test, inside your first parked folder unless you choose another. - Choose a starter kit (none, React, Vue or Livewire), a database, a test framework and a PHP version.
- Choose Create site.
Short Leash runs Laravel's own installer with the options you chose, then:
- creates the database:
database/database.sqlite, or a database on the MySQL or PostgreSQL service you picked (starting the service if needed) - sets
APP_URLtohttps://<name>.test, and mail to Short Leash's mail catcher with the site's own inbox - runs the migrations
- serves the site with HTTPS
- optionally adds the Vite dev server as a background process
It takes about a minute. You can close the window while it runs; the steps carry on. Short Leash installs the Laravel installer into its own Composer home, so you don't need it installed globally.
How do I use an existing Laravel app?
Park the folder that holds your projects, or link the project itself (see Sites). Short Leash recognizes artisan and serves public/ with the site's PHP version. To connect a database or cache, add the service and choose Add to site: Short Leash writes DB_*, REDIS_* or MAIL_* into the project's .env.
How do I run queue workers and the scheduler?
Open the site's Processes page and choose Add process. Short Leash suggests a queue worker (or Horizon), the scheduler (php artisan schedule:work), and Reverb, Pulse, Octane, Inertia SSR and the Nightwatch agent when the project uses them. Processes restart when they exit and start again with Short Leash. See Background processes.
Does Vite hot reload work?
Yes. Add the Vite process (npm run dev) and Short Leash passes Vite's WebSocket through, so hot reload works at https://<name>.test.
Can I run my app on Octane?
Yes, with Swoole or FrankenPHP, when the project requires laravel/octane. Pick it under Served by on the site's Site settings, or run leash octane frankenphp. See PHP.
How do I see mail, dumps and queries?
Mail goes to Short Leash's catcher with an inbox per site (Mail), and dump() output, queries, jobs and outgoing HTTP calls appear under Dumps without changing your code (Dumps). Broadcasting works with Reverb.
How do I step through code?
Turn on Xdebug for the site's PHP version on the Runtimes screen. It runs only for requests that ask for it, so the rest stay fast. See Xdebug.