Laravel

A local Laravel development environment for Mac.

Bothy is a native Mac app that runs PHP, MySQL or MariaDB, Redis and HTTPS for your local projects. A new Laravel app is one step: composer create-project, a database, .env pointing at it and migrations run, served from public/ at https://crm.test.

What Laravel expects from your Mac

A Laravel app needs a web server pointed at public/ that sends every request to public/index.php, a PHP version that satisfies composer.json, a database, and usually Redis, somewhere to send mail and Node for Vite. php artisan serve covers the first part for one app at a time on localhost:8000, but once you have several apps, queues, HTTPS callbacks or a client on an older PHP, a proper local server is less hassle.

Bothy runs Caddy, php-fpm and MySQL or MariaDB as ordinary Mac services. Your app stays in a normal folder and each one gets its own https://name.test, PHP version and FPM pool.

New app or existing repo, database included

The Laravel starter runs composer create-project laravel/laravel, creates a database, points .env at it and runs the migrations. public/ is detected as the document root automatically.

For an app that already lives in git, clone it into a new site, install dependencies and create the database in one command:

bothy site add crm --git git@github.com:you/crm.git --composer --db

If the GitHub CLI is installed and signed in, the app lists your repositories to pick from instead. Then copy .env.example to .env, fill in the database settings below and generate a key.

artisan, composer and tests on the right PHP

bothy site exec runs a command in the site's folder with that site's PHP first on PATH, so artisan, composer and your test runner use the version the site is served with, not whatever Homebrew linked last:

bothy site exec crm -- php artisan key:generate
bothy site exec crm -- php artisan migrate --seed
bothy site exec crm -- composer require laravel/horizon
bothy site exec crm -- php artisan test

Switching a legacy app to an older PHP is bothy site php legacy 8.1 (after bothy php install 8.1); other sites aren't affected.

Your .env settings

Local databases use root with no password on 127.0.0.1. The first server is on 3306; extra MySQL or MariaDB servers run on their own ports, shown in the Databases screen.

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=crm
DB_USERNAME=root
DB_PASSWORD=

MAIL_MAILER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=1025

REDIS_HOST=127.0.0.1
REDIS_PORT=6379

Recent Laravel versions default to SQLite and the log mailer; the lines above switch to MySQL and Mailpit, which catches everything at mail.test so notifications and password resets never reach a real inbox. You can also set environment variables per site with bothy site env crm APP_ENV local; Laravel won't overwrite a variable that's already set in the environment with a value from .env.

Redis for cache, sessions and queues

Redis is an add-on on 127.0.0.1:6379. Laravel's default Redis client is phpredis, which needs the PHP extension for each version you use:

bothy addon enable redis
bothy addon php-ext redis 8.3

Each site gets its own Redis database number, set as REDIS_DB in the site's environment, which is the variable Laravel's config/database.php reads, so two apps' caches don't collide.That variable is set for PHP-FPM only, so for queue workers started with bothy site exec set the same number in .env or with bothy site env crm REDIS_DB 3, which applies to both. bothy site purge crm flushes that site's Redis database. Memcached is available the same way if an older app uses it.

Queues, the scheduler and Vite

Queue workers and the scheduler are long-running artisan commands; run them in a terminal tab through the site's PHP:

bothy site exec crm -- php artisan queue:work
bothy site exec crm -- php artisan schedule:work

For front-end assets, enable the Node add-on (bothy addon enable node). It puts node and npm on PATH in Terminal and in bothy site exec, for Vite, Mix and Tailwind builds:

bothy site exec crm -- npm install
bothy site exec crm -- npm run build

Debugging: Xdebug, logs and request stats

bothy site xdebug crm on turns on Xdebug for that one site, in debug,develop mode on port 9003, so PhpStorm or VS Code can connect while your other sites run at full speed. It's installed for that PHP version the first time you use it.

Laravel's own log is still in storage/logs; Bothy adds the PHP error log, access log and slow log for each site, followed live in the Logs tab or with bothy logs crm --kind php. The site's page also shows requests per hour, 4xx and 5xx counts and p95 response time, which is a quick way to notice a route that got slow after a change. See live logs.

Build with Claude, Codex or Cursor

Bothy's MCP server gives AI assistants tools for sites, databases and raw SQL, PHP settings, logs and mail. You can ask Claude Code to "create a Laravel site called crm with a database and Xdebug on", then have it run migrations and check the log when a test fails. Everything it does uses the same config as the app, and every bothy command also takes --json for agents that prefer the shell. See AI development and Claude Code with local PHP.

Set it up in a minute

  1. 1
    Install Bothy

    Open the app and let setup install PHP, MySQL, Caddy and dnsmasq. Stop Herd or Valet first; Bothy needs ports 80 and 443. See installation.

  2. 2
    New app: use the Laravel starter

    Choose the Laravel starter when you add a new site in the app. It creates the project and database, writes .env and runs the migrations.

  3. 3
    Existing app: clone it

    Clone, install and create the database, then migrate.

    bothy site add crm --git git@github.com:you/crm.git --composer --db
    bothy site exec crm -- php artisan key:generate
    bothy site exec crm -- php artisan migrate
  4. 4
    Open it
    bothy site open crm       # https://crm.test

Questions

Do I need to set the document root to public/?

No. Bothy detects public/ automatically. You can pick a different folder in the site's General tab.

Which mail settings should Laravel use?

MAIL_MAILER=smtp, MAIL_HOST=127.0.0.1, MAIL_PORT=1025, no username or password. Messages appear in Mailpit at mail.test.

Can different Laravel apps use different PHP versions?

Yes. Each site has its own PHP version and FPM pool: bothy site php legacy 8.1.

Does Bothy support PostgreSQL?

No. Bothy runs MySQL and MariaDB servers, several side by side if you need them. If your app depends on Postgres, you'll need to run it separately.

Can I run Bothy alongside Laravel Herd or Valet?

Not at the same time. They all use ports 80 and 443, so stop the other one first. See Bothy as a Herd alternative.

How much is it?

$69 once, including every 1.x update. See pricing.

Get Bothy for $69.
One payment for every 1.x release. Version 2 will be a separate purchase.
Buy now