PHP code example of codebar-ag / filament-revealable-field

1. Go to this page and download the library: Download codebar-ag/filament-revealable-field 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/ */

    

codebar-ag / filament-revealable-field example snippets


use CodebarAg\FilamentRevealableField\Infolists\Components\RevealableEntry;

...

public function infolist(Infolist $infolist): Infolist
{
    return $infolist
        ->schema([
            RevealableEntry::make('revealable')
                ->label('REVEALABLE')
                ->copyable() // Enable copy functionality
                ->copyMessage('Value copied!') // Custom copy message
                ->copyableState('Custom copy text'); // Custom text to copy
        ]);
}
...

RevealableEntry::make('field_name')
    ->label('Field Label')
    ->copyable() // Enable copy functionality
    ->copyMessage('Value copied to clipboard!') // Custom success message
    ->copyableState('Custom text to copy') // Custom text to copy (defaults to field value)
    ->copyMessageDuration(3000); // Message duration in milliseconds (default: 2000)