Switching From Laravel Valet to Caddy and Mise (2 of 2)

Posted on Aug 5, 2025

This is a continuation of a previous post that covers setting up Caddy.

Caddy did a great job handling serving local development apps with SSL and simple, explicit configuration. For that it has completely replaced Laravel Valet in my workflow.

I still needed a way to map run-time versions of various languages and build tools to project directories. Previously I used a mix of tools to handle this. Mise-en-place has replaced all of them and also provides a task runner and ENV variable handler in a single, elegant .toml file.

Adding mise-en-place

First, install mise-en-place. For the latest instructions, follow the guide in the mise-en-place documentation. Id also highly recommend reading through the full documentation and watching the interview linked above.

Next, we’ll install the adsf-php-brew plugin to use Homebrew to manage our PHP versions.

    mise plugin install php https://github.com/ntzrbtr/asdf-php-brew.git
  

Configuring your defaults

Next, we’ll edit ~/.config/mise/config.toml to set our defaults. These are mine. Check the documentation to configure your own to suit.

    [tools]
bun = 'latest'
node = '24'
rust = 'stable'

[settings]
idiomatic_version_file_enable_tools = ["node"]

[alias]
php = "asdf:https://github.com/jtolj/asdf-php-brew.git"
  

Configuring individual projects

Finally, you can add a mise.local.toml to your project root (I also recommend adding this file to your global .gitignore).

Here’s an example from one of my Laravel projects:

    [tools]
php = "8.4"

[tasks.test]
description = "Run the test suite"
run = "php artisan test"

[tasks.check]
description = "Run all static analysis checks"
depends = ["phpstan", "arch"]

[tasks.build]
description = "Build the application for production"
run = "bun run build"

[tasks.phpstan]
description = "Run PHPStan"
run = "./vendor/bin/phpstan"

[tasks.arch]
description = "Run architecture tests"
run = "php artisan test --testsuite=Architecture"
  

Notice that the consolidated task runner allows you to combine PHP and JavaScript tasks in a single runner. Obviously you can do the same with composer.json or package.json scripts, but I appreciate having a single command (mise run) to see a list the tasks I’ve configured for all of my projects, regardless of language.

You can also manage environment variables on a global or per-directory basis, which is incredibly helpful for projects that don’t use or support a .env file.

If you followed this guide and ran into any issues or have any tips, please email me so that I can correct or improve it.