Laravel Sandbox
The Laravel Sandbox is a fresh Laravel application bundled with Runlet, ready in the first tab. Use it to try Laravel's APIs, Eloquent, collections, or a package's idea without opening a project. It needs no setup and no database server: it runs on SQLite.
use App\Models\User;
User::factory()->count(3)->create();
User::query()->latest()->pluck('email');What's Inside
The sandbox is Laravel 13.34.0, with:
- A SQLite database, already migrated: the
users,cache, andjobstables, with theUsermodel and its factory. - Settings for trying things:
APP_ENV=localwith debug on, array sessions, the file cache, thesyncqueue (jobs run at once, in the run), and thelogmailer (mail goes to the log, not to anyone). - Its own random
APP_KEY, made when Runlet installs the sandbox on your Mac.
Snippets get $app, as in any Laravel project, and everything that works in a Laravel project works here: the run inspector records the queries, mail, and logs, an SQL tab on the sandbox opens its SQLite database, and the Commands panel lists its Artisan commands. Open REPL opens Tinker.
The sandbox is always a development target: it can't be marked as staging or production.
Which PHP It Uses
The sandbox needs PHP 8.3 or later with the tokenizer extension, or Docker. Choose in Settings ▸ Sandbox ▸ Run sandbox with:
| Option | What runs the sandbox |
|---|---|
| Automatic (the default) | A compatible PHP on your Mac, else a disposable Docker container. |
| Local PHP | A compatible PHP on your Mac only. |
| Docker | A disposable php:8.4-cli container, even when your Mac has PHP. |
On your Mac, the sandbox prefers the default PHP from Settings ▸ PHP when it is 8.3 or later, then the first compatible PHP Runlet found (the php on your PATH first, stable releases before betas). Runlet's own PHP comes last, so PHP you installed always wins.
In Docker, each run starts a new container with the sandbox mounted, and removes it afterwards. The first Docker run needs the image, a one-time download of a few hundred megabytes: Runlet offers Download Docker Image, and reuses the image for every run after that.
Resetting the Sandbox
To start over, choose Reset Sandbox… in the target menu, or in Settings ▸ Sandbox. Runlet deletes the sandbox's own data (its SQLite database, cache, sessions, logs, and compiled views) and puts back a fresh copy of Laravel. Your projects, Docker and SSH targets, snippets, and history are not touched.
Settings ▸ Sandbox ▸ Location shows where the sandbox lives on your Mac, with Reveal in Finder.
NOTE
Each Laravel version of the sandbox has its own folder. When a Runlet update brings a newer Laravel, the sandbox starts fresh, and what you created in the old one stays in its old folder.
Auto-Run
In a sandbox tab, Runlet can run the whole tab each time you stop typing: click Auto-run in the toolbar to turn it on for that tab. It's off by default, never runs the code that's already there, and only the sandbox has it. See Sandbox Auto-Run.