Search code examples
phplaravelbackendservice-provider

Class 'App\Providers\TeamWorkServiceProvider' not found -- on AWS Server


This provider is completely working fine on the local machine. This issue occurs only on the server. I had created a Custom Teamwork service provider Also register on app/config as below - App\Providers\TeamWorkServiceProvider::class, Also Created separate directory under app folder :app/Teamwork Below image he code of TeamworkServiceProvider.php file which is inside the provider folder: Folder snaps with teamworkServicePRovider

This is an issue

To resolve this issue I had already tried below points:

  1. delete vendor and run composer install
  2. also run php artisan config:cache
  3. remove bootstrap/config/cache file

Solution

  • Your class is not called TeamWorkServiceProvider it is TeamworkServiceProvider, the case matters because of how composer will match up the class name to a filename. On a case sensitive filesystem TeamWorkServiceProvider.php and TeamworkServiceProvider.php are different files.