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

lara72175's avatar

php artisan cache:clear: Call to undefined method Illuminate\Foundation\Console\ClosureCommand::setHidden()

I am getting an error

Call to undefined method Illuminate\Foundation\Console\ClosureCommand::setHidden() when i run php artisan cache:clear

0 likes
2 replies
tykus's avatar

Probably something borked in the vendor directory. Try removing the vendor directory and re-running composer to install your dependencies.

isc.lopezm's avatar

I'm getting the same issue, I already removed vendor's folder, run a clear-compiled artisan command,... nothing works for me.

I saw on the Classes and the inheritance; everything looks fine. The method exists on the class.

Please or to participate in this conversation.