PHP code example of spectate / laravel-react-email

1. Go to this page and download the library: Download spectate/laravel-react-email library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

spectate / laravel-react-email example snippets

bash
php artisan vendor:publish --tag="react-email-config"
json
{
    "post-install-cmd": [
        "@php artisan react-email:build"
    ]
}
bash
php artisan make:react-email MyFirstEmail
bash
php artisan react-email:dev
tsx
export default function MyEmail() {
    return (
        <Html>
            Hello, $$name$$!
        </Html>
    );
}
blade
Hello, {{ $name }}!
bash
php artisan react-email:build