Auto-register leadmail mailer config at boot time
This commit is contained in:
@@ -13,6 +13,10 @@ class LeadMailServiceProvider extends ServiceProvider
|
|||||||
{
|
{
|
||||||
$this->mergeConfigFrom(__DIR__.'/../config/leadmail.php', 'leadmail');
|
$this->mergeConfigFrom(__DIR__.'/../config/leadmail.php', 'leadmail');
|
||||||
|
|
||||||
|
$this->app->booted(function () {
|
||||||
|
config(['mail.mailers.leadmail' => ['transport' => 'leadmail']]);
|
||||||
|
});
|
||||||
|
|
||||||
$this->app->singleton(LeadMailClient::class, function () {
|
$this->app->singleton(LeadMailClient::class, function () {
|
||||||
return new LeadMailClient(
|
return new LeadMailClient(
|
||||||
baseUrl: config('leadmail.url'),
|
baseUrl: config('leadmail.url'),
|
||||||
|
|||||||
Reference in New Issue
Block a user