PHP code example of danielhe4rt / filament-mails

1. Go to this page and download the library: Download danielhe4rt/filament-mails 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/ */

    

danielhe4rt / filament-mails example snippets


use Backstage\FilamentMails\Facades\FilamentMails;

public function panel(Panel $panel): Panel
{
    return $panel
        ->routes(fn () => FilamentMails::routes());
}

use Backstage\FilamentMails\FilamentMailsPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugin(FilamentMailsPlugin::make());
}

use Backstage\FilamentMails\FilamentMailsPlugin;
use Backstage\FilamentMails\Facades\FilamentMails;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugin(FilamentMailsPlugin::make())
        ->tenantRoutes(fn() => FilamentMails::routes());
}

return [
    'resources' => [
        'mail' => \App\Filament\Resources\MailResource::class,
        'event' => \App\Filament\Resources\EventResource::class,
        'suppression' => \App\Filament\Resources\SuppressionResource::class
    ],
];
bash
php artisan vendor:publish --tag="mails-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="mails-config"
php artisan vendor:publish --tag="filament-mails-config"
bash
php artisan vendor:publish --tag="filament-mails-views"