Merge pull request #210 from Boy132/patch-1

Use correct variable name for mail driver
This commit is contained in:
Charles 2024-05-13 19:14:27 -04:00 committed by GitHub
commit 2f8a15facd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View File

@ -31,7 +31,7 @@ class EmailSettingsCommand extends Command
*/ */
public function handle(): void public function handle(): void
{ {
$this->variables['MAIL_DRIVER'] = $this->option('driver') ?? $this->choice( $this->variables['MAIL_MAILER'] = $this->option('driver') ?? $this->choice(
trans('command/messages.environment.mail.ask_driver'), trans('command/messages.environment.mail.ask_driver'),
[ [
'log' => 'Log', 'log' => 'Log',
@ -41,10 +41,10 @@ class EmailSettingsCommand extends Command
'mandrill' => 'Mandrill', 'mandrill' => 'Mandrill',
'postmark' => 'Postmark', 'postmark' => 'Postmark',
], ],
'smtp', env('MAIL_MAILER', env('MAIL_DRIVER', 'smtp')),
); );
$method = 'setup' . studly_case($this->variables['MAIL_DRIVER']) . 'DriverVariables'; $method = 'setup' . studly_case($this->variables['MAIL_MAILER']) . 'DriverVariables';
if (method_exists($this, $method)) { if (method_exists($this, $method)) {
$this->{$method}(); $this->{$method}();
} }

View File

@ -17,7 +17,6 @@
<env name="MAIL_MAILER" value="array"/> <env name="MAIL_MAILER" value="array"/>
<env name="SESSION_DRIVER" value="array"/> <env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_CONNECTION" value="sync"/> <env name="QUEUE_CONNECTION" value="sync"/>
<env name="MAIL_DRIVER" value="array"/>
</php> </php>
<source> <source>
<include> <include>