PHP code example of monzer / filament-email-verification-alert

1. Go to this page and download the library: Download monzer/filament-email-verification-alert 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/ */

    

monzer / filament-email-verification-alert example snippets


use Monzer\FilamentEmailVerificationAlert\EmailVerificationAlertPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            EmailVerificationAlertPlugin::make(),
        ]);
}

EmailVerificationAlertPlugin::make()

->color('blue') // 'yellow', 'blue', or 'red'

->persistClosedState() // Alert will stay hidden after being closed until the session ends

->closable(false) // Removes the close button, making the alert persistent

->placeholder(false) // Disables the loading placeholder

->verifyUsing(function($user) {
    // Custom verification logic
    $user->notify(new CustomVerificationNotification());
    
     Notification::make()
     ->title(trans('filament-email-verification-alert::messages.verification.success'))
     ->success()
     ->send();
})

->renderHookName('panels::body.start')

->renderHookScopes([ListUsers::class])

->lazy(false) // Default is true

use Monzer\FilamentEmailVerificationAlert\EmailVerificationAlertPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            EmailVerificationAlertPlugin::make()
                ->color('blue')
                ->persistClosedState()
                ->closable(true)
                ->placeholder(true)
                ->renderHookName('panels::body.start')
                ->renderHookScopes([ListUsers::class])
                ->lazy(false)
                ->verifyUsing(function($user) {
                 // Custom verification logic
                  $user->notify(new CustomVerificationNotification());
    
                  Notification::make()
                  ->title(trans('filament-email-verification-alert::messages.verification.success'))
                  ->success()
                  ->send();
                }),
        ]);
}

EmailVerificationAlertPlugin::make()
    ->color('blue')
    ->persistClosedState()
    ->closable(true)
    ->placeholder(true)
    ->lazy(false)
    ->renderHookName('panels::body.start');