app->make('config'); $config->set([ 'mail.mirfalah' => array_merge([ 'api_key' => env('MIRFALAH_SENDMAIL_APIKEY'), 'secret' => env('MIRFALAH_SENDMAIL_SECRET'), 'endpoint' => env( 'MIRFALAH_SENDMAIL_ENDPOINT', 'https://pahangmail.mirfalah.my/mirfalah-sendmail/index.php' ), ], $config->get('mail.mirfalah', [])) ]); $this->app->afterResolving('swift.transport', function (TransportManager $manager) use ($config) { $manager->extend('mirfalah', function (Container $app) use ($config) { return new MirfalahTransport( $config->get('mail.mirfalah.api_key', env('MIRFALAH_SENDMAIL_APIKEY')), $config->get('mail.mirfalah.secret', env('MIRFALAH_SENDMAIL_SECRET')), $config->get('mail.mirfalah.endpoint', env('MIRFALAH_SENDMAIL_ENDPOINT')) ); }); }); } }