Got help on Laravel's discord for this one: For some reason, that I'll never understand, I had LARAVEL_ENV=testing in my .env file, preventing pail from booting.
Hope this help someone sometime
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I've been going on circles with this one. php artisan pail used to work on my project, and now the command always outputs the following:
php artisan pail
ERROR Command "pail" is not defined. Did you mean one of these?
⇂ sail:add
⇂ sail:install
⇂ sail:publish
I tried everything I could think of, including removing / reinstalling the package, nuking vendor, etc. Nothing seems to make pail work on this specific project.
Another project created with the react starter have pail working without any issue, with the same version of PHP.
Here's the last attempt (rm -rf vendor && composer install) :
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 141 installs, 0 updates, 0 removals
....
- Installing laravel/pail (v1.2.3): Extracting archive
....
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
INFO Discovering packages.
inertiajs/inertia-laravel ..................... DONE
laravel/boost ...................................... DONE
laravel/dusk ........................................... DONE
laravel/fortify .................................... DONE
laravel/mcp ................................................ DONE
laravel/pail .................................................... DONE <=== here's pail
laravel/roster .................................................. DONE
laravel/sail ....................................................... DONE
laravel/tinker ............................................................. DONE
laravel/wayfinder ...................................................... DONE
nesbot/carbon ........................................................... DONE
nunomaduro/collision .............................................. DONE
nunomaduro/termwind ............................................ DONE
pestphp/pest-plugin-laravel ................................... DONE
spatie/laravel-permission ....................................... DONE
89 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
🍺 ~/dev/my-app (station-version)*$ php artisan pail
ERROR Command "pail" is not defined. Did you mean one of these?
⇂ sail:add
⇂ sail:install
⇂ sail:publish
Anyone have any clue what's going on here ? 🙏
Please or to participate in this conversation.