resend / resend-laravel
Resend for Laravel
Installs: 158 590
Dependents: 1
Suggesters: 0
Security: 0
Stars: 94
Watchers: 2
Forks: 7
Open Issues: 9
Requires
- php: ^8.1
- illuminate/http: ^10.0|^11.0
- illuminate/support: ^10.0|^11.0
- resend/resend-php: ^0.14.0
- symfony/mailer: ^6.2|^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.14
- mockery/mockery: ^1.5
- orchestra/testbench: ^8.17|^9.0
- pestphp/pest: ^2.0
- dev-main / 1.x-dev
- v0.15.0
- v0.14.0
- v0.13.0
- v0.12.0
- v0.11.0
- v0.10.0
- v0.9.0
- v0.8.0
- v0.7.1
- v0.7.0
- v0.6.0
- v0.5.0
- v0.4.0
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.0
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-renovate/resend-resend-php-0.x
- dev-php84
- dev-feat-domain-webhook-event
- dev-renovate/ubuntu-24.x
- dev-renovate/pestphp-pest-3.x
This package is auto-updated.
Last update: 2024-12-19 23:57:34 UTC
README
Provides Resend integration for Laravel and Symfony Mailer.
Requires PHP 8.1+
Examples
Send an email with:
Getting started
First install Resend for Laravel via the Composer package manager:
composer require resend/resend-laravel
Next, you should configure your Resend API key in your application's .env
file:
RESEND_API_KEY=re_123456789
Finally, you may use the Resend
facade to access the Resend API:
use Resend\Laravel\Facades\Resend; Resend::emails()->send([ 'from' => 'onboarding@resend.dev', 'to' => 'user@gmail.com', 'subject' => 'hello world', 'text' => 'it works!', ]);
Using Resend's Laravel mailer
Resend for Laravel comes bundled with a Laravel mailer to make it easier to send emails. To start using the Resend mail transport, first create a new mailer definition within your application's config/mail.php
configuration file:
'resend' => [ 'transport' => 'resend', ],
Note The Resend mailer will use the
RESEND_API_KEY
in your application's.env
file.
Finally, update the MAIL_MAILER
environment variable to use resend
:
MAIL_MAILER=resend