I have changed my application by using command
php artisan app:name [app_name]
.
Then, when I try to perform other actions using following artisan commands,
php artisan down
php artisan up
php artisan config:cache
I got the following error:
PHP Fatal error: Class 'App\Providers\AppServiceProvider' not found
How can I solve it?
It is working after Clearing bootstrap/cache
directory.
This is how its worked out for me in the case of a fresh install.
First, I cleared the files in boostrap\cache.
Then, in config\app.php, I added the below line in the providers,
\Laravel\Telescope\TelescopeServiceProvider::class,
Then I ran the below commands
php artisan telescope:install
php artisan migrate
And it was working after this.
I don't know for what reason the telescope provider didn't work which was added by Laravel itself. i.e App\Providers\TelescopeServiceProvider::class
.
By the way my laravel version was 7.12.0.
In my case, some extension of the VSCode, added a use Illuminate\Support\Facades\App;
at the beginning of the file /config/app.php
.
I solved it by removing the line from the file and running composer install
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With