Laravel Ships artisan doctor: A Built-In Health Check for Your App
One of the quieter but genuinely useful announcements out of Laracon US 2026 in Boston was laravel/doctor, a first-party diagnostics package that ships a new artisan doctor command. It runs a set of health checks against your application and tells you, in plain language, what's misconfigured — and in some cases, fixes it for you on the spot.
What it checks
Running php artisan doctor walks through a battery of checks that experienced Laravel developers have all learned to check manually after a bad deploy:
- Is
APP_KEYset, and is it valid for the cipher your app expects? - Does your installed PHP version satisfy what
composer.jsonrequires? - Are the PHP extensions your dependencies need actually installed and enabled?
- Is your
.envfile present and consistent with.env.example? - Are storage and cache directories writable by the web server user?
Where doctor can fix a problem itself — generating a missing APP_KEY, for instance — it does, and tells you what it changed. Where it can't, like a missing PHP extension, it tells you exactly what's wrong and, where possible, how to fix it.
php artisan doctor
APP_KEY is set and valid
PHP 8.4.6 satisfies composer.json requirement (^8.3)
✗ Missing PHP extension: intl
→ Required by: symfony/intl (via laravel/framework)
→ Fix: enable the intl extension in your php.ini
✓ .env matches .env.example keys
✓ storage/ and bootstrap/cache/ are writable
Extensible by design
Package authors can register their own checks so that a package with specific configuration requirements — a queue driver needing a particular Redis extension, say, or a package that depends on a specific config value being set — surfaces its own diagnostics right alongside the framework's, instead of failing silently three requests later in production.
A natural fit for AI coding agents
The Laravel team specifically called out artisan doctor as a sensible last step for AI coding agents: after an agent makes a batch of changes, running doctor as a sanity check catches missing extensions, stale env keys, or broken configuration before the agent — or you — considers the task done. It's a small thing, but it closes a real gap: agents are good at writing code, less reliably good at noticing "oh, this environment is now missing a PHP extension that code needs."
Getting it
laravel/doctor is a separate Composer package rather than something baked directly into laravel/framework, which keeps it optional and versioned independently:
composer require laravel/doctor --dev
It's a small addition to your toolbox, but if you've ever spent twenty minutes debugging a deploy only to discover a missing PHP extension, artisan doctor is aimed squarely at you.