34 lines
798 B
PHP
34 lines
798 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Mail\Transport\ResendCurlTransport;
|
|
use App\Services\ResendEmailService;
|
|
use Illuminate\Support\Facades\Mail;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
Mail::extend('resend_curl', function (array $config = []) {
|
|
return new ResendCurlTransport(
|
|
app(ResendEmailService::class),
|
|
$config['from']['address'] ?? config('mail.from.address'),
|
|
$config['from']['name'] ?? config('mail.from.name')
|
|
);
|
|
});
|
|
}
|
|
}
|