I develop a laravel app and I want to automatically send emails with remainder to users.
I created command like in this article. But I get this error:
[Illuminate\Contracts\Container\BindingResolutionException]
Unresolvable dependency resolving [Parameter #0 [ <required> $config ]] in
class RollbarNotifier
This is my code:
.env
MAIL_DRIVER=smtp
MAIL_HOST=example.com
MAIL_PORT=465
[email protected]
MAIL_PASSWORD=PAssWord
MAIL_ENCRYPTION=SSL
[email protected]
MAIL_FROM_NAME="FROM FROM"
ROLLBAR_TOKEN=<my_token>
config/mail.php
<?php
return [
'driver' => env('MAIL_DRIVER', 'smtp'),
'host' => env('MAIL_HOST', 'example.com'),
'port' => env('MAIL_PORT', 465),
'from' => [
'address' => env('MAIL_FROM_ADDRESS', '[email protected]'),
'name' => env('MAIL_FROM_NAME', 'FROM FROM'),
],
'encryption' => env('MAIL_ENCRYPTION', 'SSL'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'sendmail' => '/usr/sbin/sendmail -bs',
'markdown' => [
'theme' => 'default',
'paths' => [
resource_path('views/vendor/mail'),
],
],
];
It looks like your dependency injection is not working. It is missing a configuration file.
I am not sure which package you are using. But when I look at the installation manual at https://github.com/jenssegers/laravel-rollbar I see you also have to add some configuration in the
services.php
: