PHP code example of juliomotol / filament-password-confirmation

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

    

juliomotol / filament-password-confirmation example snippets


JulioMotol\FilamentPasswordConfirmation\FilamentPasswordConfirmationPlugin;

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

FilamentPasswordConfirmationPlugin::make()
    ->routeName('confirm')
    ->routeUri('auth/confirm')
    ->routeMiddleware(FooMiddleware::class) // Accepts string|array
    ->passwordTimeout(10800) // Accepts int|null that represents the amount of seconds

use JulioMotol\FilamentPasswordConfirmation\RequiresPasswordConfirmation;

class AdminResource extends Resource
{
    use RequiresPasswordConfirmation;
    ...
}

use JulioMotol\FilamentPasswordConfirmation\RequiresPasswordConfirmation;

class AdminResource extends Resource
{
    use RequiresPasswordConfirmation;

    protected static ?int $passwordTimeout = 360; // the amount of seconds
    ...
}
bash
php artisan vendor:publish --tag="filament-password-confirmation-translations"
php artisan vendor:publish --tag="filament-password-confirmation-views"