try php artisan view:clear
Views has a separate cache
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I replaced a blade file with a new file with the same name. Now I get "Undefined variable" error. The variable doesn't exist anymore (also not in the Controller).
I even deleted the file completely to check that I load the correct file. Then I get "file not found" error, so I know it is the correct file.
Why does it still look for the old variables even after I did php artisan cache:clear? Is there anything else I should clear
try php artisan view:clear
Views has a separate cache
Please or to participate in this conversation.