PHP code example of defstudio / filament-dynamic-actions

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

    

defstudio / filament-dynamic-actions example snippets


    \Filament\Actions\Action::make('download')
            ->icon('heroicon-o-document-arrow-down')
            ->action(function($record){...})
             ->disabledWhenDirty()

    \Filament\Actions\Action::make('download')
            ->icon('heroicon-o-document-arrow-down')
            ->action(function($record){...})
             ->disabledWhenDirty(
                message: "oops! There are unsaved changes",
                disabledClass: 'disabled:opacity-100 disabled:bg-red-500',
                ignoredFields: [
                    'path.also_with_subpath.of.a.field.i_dont_care_to_check'
                ]   
             )
bash
php artisan vendor:publish --tag="filament-dynamic-actions-translations"