delete your bootstrap/cache/services.php and bootstrap/cache/config.php
Mar 21, 2016
3
Level 3
Removed SeriviceProvider now php artisan won't work
I created my own service provider called TokenAuthServiceProvider.php for a facade called TokenAuth which was for a class called TokenAuth.
I had it registered in config\app.php under the providers list, I had an alias registered under `aliases' too.
It worked perfectly and I was using it in two controllers and in a middleware.
I now don't need it anymore as I wrote something better instead of it. But when I tried to remove it I am getting a fatal error. The steps I took were:
- Deleted the lines in config\app.php in the providers and aliases lists.
- Deleted the files
- TokenAuthServiceProvider.php
- facades\TokenAuth.php
- TokenAuth.php
- Deleted every reference to TokenAuth I could find in all my files (controllers and middleware).
- Ran in command line
$ composer dump-autoload
Now when I run php artisan I get a Fatal Error
vagrant@homestead:~/projects/letsdb/v1$ php artisan
PHP Fatal error: Class 'App\Letsdb\Providers\TokenAuthServiceProvider' not found in /home/vagrant/projects/letsdb/v1/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 146
PHP Stack trace:
PHP 1. {main}() /home/vagrant/projects/letsdb/v1/artisan:0
PHP 2. Illuminate\Foundation\Console\Kernel->handle() /home/vagrant/projects/letsdb/v1/artisan:36
PHP 3. Illuminate\Foundation\Console\Kernel->bootstrap() /home/vagrant/projects/letsdb/v1/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:105
PHP 4. Illuminate\Foundation\Application->bootstrapWith() /home/vagrant/projects/letsdb/v1/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:208
PHP 5. Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap() /home/vagrant/projects/letsdb/v1/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:203
PHP 6. Illuminate\Foundation\Application->registerConfiguredProviders() /home/vagrant/projects/letsdb/v1/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php:17
PHP 7. Illuminate\Foundation\ProviderRepository->load() /home/vagrant/projects/letsdb/v1/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:507
PHP 8. Illuminate\Foundation\ProviderRepository->compileManifest() /home/vagrant/projects/letsdb/v1/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:60
PHP 9. Illuminate\Foundation\ProviderRepository->createProvider() /home/vagrant/projects/letsdb/v1/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:114
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'App\Letsdb\Providers\TokenAuthServiceProvider' not found
I don't know how to continue with out the service provider.
Level 29
Please or to participate in this conversation.