Important
This repository has been consolidated into the new resend-examples monorepo, which contains updated examples for all languages and frameworks.
This example shows how to use Resend with Laravel.
To get the most out of this guide, you’ll need to:
- Install the
composerandnpmdependencies:
composer install && npm install- Build the Javascript and CSS files required for the frontend:
npm run build- Create a
.envfile used to configure your application:
php -r "file_exists('.env') || copy('.env.example', '.env');"- Generate an application key:
php artisan key:generate --ansi-
Configure your
.envfile, with your database credentials and Resend API key. -
Migrate the database:
php artisan migrate- You're ready to use the example project, run:
php artisan serveTo get the full experience of how easy it is to send emails with Resend, follow these simple steps:
- Create two user accounts with valid email addresses.
- Once you have two user accounts, login into any one of them and navigate to the "Chirps" page.
- Write your very first Chirp.
- Once you have submitted your first Chirp, the application will use Resend to email all users of your new Chirp.
- If you used a valid email address you should receive an email in your inbox or you can check your Resend dashboard to view the sent email.