Class 'App\Console\Carbon' not found?

Published 1 year ago by vipin93

I just run command composer update after this now when i try to run php artisan command its showing errors

Writing lock file
Generating autoload files

Illuminate\Foundation\ComposerScripts::postUpdate
php artisan optimize
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'App\Console\Carbon' not found

Script php artisan optimize handling the post-update-cmd event returned with error code 1

even I did not changed my any code

Best Answer (As Selected By vipin93)
Ruffles

Add use Carbon\Carbon; at the top of the console command class.

Ruffles
Ruffles
1 year ago (297,250 XP)

Add use Carbon\Carbon; at the top of the console command class.

Please sign in or create an account to participate in this conversation.