Lumen 邮件驱动程序为空问题
Lumen mail driver is null issue
我正在关注这个 link https://lumen.laravel.com/docs/5.7/mail
这是我的 bootstrap/app.php 代码
$app->withFacades();
$app->withEloquent();
$app->register(\Illuminate\Mail\MailServiceProvider::class);
$app->configure('services');
$app->configure('mail');
$app->alias('mailer', Illuminate\Mail\Mailer::class);
$app->alias('mailer', Illuminate\Contracts\Mail\Mailer::class);
$app->alias('mailer', Illuminate\Contracts\Mail\MailQueue::class);
我运行下面的代码也是
composer require illuminate/mail
composer update
这是我的 .env
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=abc@gmail.com
MAIL_PASSWORD=Abc@12345
MAIL_ENCRYPTION=tls
我安装了新的 lumen,我确信我没有遗漏任何东西。
我遇到了这个错误
Unable to resolve NULL driver for [Illuminate\Mail\TransportManager].
问题。您需要为邮件添加配置文件。 (config/mail.php)
Just Copy Laravel mail.php config file to lumen root_dir/config/mail.php
我正在关注这个 link https://lumen.laravel.com/docs/5.7/mail
这是我的 bootstrap/app.php 代码
$app->withFacades();
$app->withEloquent();
$app->register(\Illuminate\Mail\MailServiceProvider::class);
$app->configure('services');
$app->configure('mail');
$app->alias('mailer', Illuminate\Mail\Mailer::class);
$app->alias('mailer', Illuminate\Contracts\Mail\Mailer::class);
$app->alias('mailer', Illuminate\Contracts\Mail\MailQueue::class);
我运行下面的代码也是
composer require illuminate/mail
composer update
这是我的 .env
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=abc@gmail.com
MAIL_PASSWORD=Abc@12345
MAIL_ENCRYPTION=tls
我安装了新的 lumen,我确信我没有遗漏任何东西。
我遇到了这个错误
Unable to resolve NULL driver for [Illuminate\Mail\TransportManager].
问题。您需要为邮件添加配置文件。 (config/mail.php)
Just Copy Laravel mail.php config file to lumen root_dir/config/mail.php