Thelonias
Thelonias

Reputation: 2935

Custom package service provider cannot be found

I'm trying to develop a custom package using "workbench". It's a simple package that will create a repository to consume a different API we have. I plan on injecting this repository into my controllers of my application. Anyway, I created the package using "workbench". This creates the service provider. The Laravel docs say to add the service provider to my "providers" array in app.config. I've done this, but when I run composer update, I get an error saying that the class is not found, specifically: PHP Fatal error: Class 'MyVendor\MyPackage\ServiceProvider not found in /.. .. .. ../laravel/vendor/framework/src/Illuminate/Foundation/ProviderRepository.php. I thought I followed the docs correctly, what am I missing?

Upvotes: 0

Views: 188

Answers (1)

Thelonias
Thelonias

Reputation: 2935

Simply running composer install inside the workbench directory resolves this issue.

Upvotes: 1

Related Questions