Reputation: 205
I am trying to "merge" Mandrill in Laravel. I always get the same error on my page. Class 'Weblee\Mandrill\MandrillServiceProvider'
not found. The weird thing is that I did name the class in my config.app.
Steps that I did.
[RuntimeException] Error Output: PHP Fatal error: Class Weblee\Mandrill\MandrillServiceProvider' not found in /var/www/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 146
This is my config/app.php
'providers' => [
Weblee\Mandrill\MandrillServiceProvider::class,
],
'aliases' => [
*Other aliases*
'MandrillMail' => 'Weblee\Mandrill\MandrillFacade',
],
cmposer.json
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"weblee/mandrill": "dev-master"
},
rest of code
Upvotes: 0
Views: 708
Reputation: 259
Here is the way to do this
First, install weblee package using composer.json file.
Add this in your composer.json file
"require": {
"php": "^7.1.3", "laravel/framework": "5.8.*", "laravel/tinker": "^1.0", "weblee/mandrill": "dev-master" },
And after that run composer update
then add your Weblee\Mandrill\MandrillServiceProvider::class,
in config\app.php
One more thing
'aliases' => [
*Other aliases*
'MandrillMail' => Weblee\Mandrill\MandrillFacade::class,
],
Don't use single quotes
Upvotes: 3