Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

machour's avatar

php artisan pail : Command "pail" is not defined.

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) :

Anyone have any clue what's going on here ? 🙏

0 likes
1 reply
machour's avatar

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

Please or to participate in this conversation.