PHP code example of daikazu / filament-copy

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

    

daikazu / filament-copy example snippets


use Daikazu\FilamentCopy\Components\CopyButton;

// In your Filament form or table
CopyButton::make('copy_button')
    ->content('Text to copy')
    ->label('Copy to Clipboard');

use Daikazu\FilamentCopy\Components\CopyButton;

CopyButton::make('copy_button')
    ->content(fn ($record) => $record->email)
    ->label('Copy Email')
    ->icon('heroicon-o-clipboard')
    ->color('success')
    ->size('sm')
    ->tooltip('Click to copy email address');
bash
php artisan vendor:publish --tag="filament-copy-config"