Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Resend Php Laravel Package

resend/resend-php

The official PHP client for the Resend email API. Install via Composer on PHP 8.1+, then send email in a few lines with a simple client interface inspired by OpenAI PHP.

View on GitHub
Deep Wiki
Context7

Resend PHP is an official-style PHP client for the Resend email API, requiring PHP 8.1+ and installable via Composer. Inspired by OpenAI PHP, it provides a clean, intuitive interface for sending transactional emails from PHP applications, including Laravel projects.

$resend = Resend::client('re_123456789');

$resend->emails->send([
    'from' => '[email protected]',
    'to' => '[email protected]',
    'subject' => 'hello world',
    'text' => 'it works!',
]);
  • Simple client setup with a single API key
  • Email sending via a fluent, array-based API
  • Laravel-friendly integration
  • Lightweight and PSR-compatible
  • Actively tested with a dedicated CI workflow
Frequently asked questions about Resend Php
How do I install resend/resend-php in a Laravel app?
Install it with composer require resend/resend-php; the package requires PHP 8.1 or newer. In Laravel, add your Resend API key to .env, bind Resend::client() in a service provider, and inject it where needed. Avoid creating a new client in every controller.
Does resend/resend-php support Laravel 10 and Laravel 11?
The SDK is framework-agnostic and requires PHP 8.1+, so it can run in Laravel 10, 11, or any Laravel version that supports that PHP baseline. It does not ship Laravel-specific version constraints or service providers. If you are on an older PHP version, you cannot use this package.
How do I configure the Resend API key in Laravel?
Store the key as RESEND_API_KEY in your .env file and reference it from config/services.php. Register a singleton in a service provider that calls Resend::client(config('services.resend.key')). Then inject the client into controllers, jobs, or services instead of hardcoding credentials.
Can I send Resend emails through Laravel queues?
Yes, you can dispatch a Laravel job that calls $resend->emails->send() so email sending runs asynchronously. The SDK is not a native Laravel mail transport, so you own the job, retry, and failure handling. Pair queue retries with idempotency keys to avoid duplicate sends.
What is the usage service added in resend-php v1.16.0?
Added in v1.16.0, the usage service is a first-class resource for retrieving account-level usage and quota data through the same Resend client. It is read-only and does not include scheduling, caching, or threshold alerting. Most teams pair it with a scheduled Laravel command, cache the response, and dispatch alerts when quota crosses a limit.
How do I handle Resend webhooks in Laravel?
The SDK supports Resend webhooks but does not natively translate them into Laravel events. Create a controller or route to receive the payload, verify the webhook signature, and map each Resend event to your own Laravel event or listener. You should design and test that listener layer yourself.
Does resend-php integrate with Laravel Mail or the Notifiable trait?
No. resend-php is an official PHP SDK and does not provide Laravel Mail facade integration, Notifiable channels, or mailables out of the box. You can bridge it with a custom mailer, facade, or notification channel if you want Laravel-native ergonomics. Many teams simply call the client from services or jobs.
How do I test Resend integration in Laravel?
The package includes PHPUnit tests, but you still need Laravel-specific tests for jobs, service bindings, and scheduled usage polling. Bind a fake or mocked client in the container and assert that your code calls the expected resources. Keep integration tests separate from unit tests so you do not hit the live Resend API.
Does resend-php support idempotency keys and retries?
Yes. resend-php supports Idempotency-Key headers and rate-limiting error handling, which aligns well with Laravel queue retries. Generate a unique idempotency key per logical send and reuse it across retries. This helps prevent duplicate emails when a job is retried after a timeout or rate limit.
What are the alternatives to resend/resend-php for Laravel email?
Alternatives include Laravel's built-in Mail system with SMTP or API transports, Symfony Mailer, and community packages. Choose the official SDK when you need Resend-specific features such as templates, contacts, automations, events, and usage data. For simple transactional mail, Laravel Mail plus a transport may be enough.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo