PHP code example of araga-dev / filament-invertible-fields

1. Go to this page and download the library: Download araga-dev/filament-invertible-fields 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/ */

    

araga-dev / filament-invertible-fields example snippets


use Araga\FilamentInvertibleFields\Tables\Filters\InvertibleMultiSelectFilter;

InvertibleMultiSelectFilter::make('status')
    ->label(__('filament-invertible-fields::messages.status'))
    ->column('status')
    ->options([
        'draft' => 'Draft',
        'published' => 'Published',
        'archived' => 'Archived',
    ]);

use Araga\FilamentInvertibleFields\Forms\Components\InvertibleMultiSelect;

InvertibleMultiSelect::make('values')
    ->options([ '1' => 'One', '2' => 'Two' ]);

use Araga\FilamentInvertibleFields\Tables\Filters\InvertibleTextInputFilter;

InvertibleTextInputFilter::make('sku')
    ->label(__('filament-invertible-fields::messages.sku'))
    ->column('sku')
    ->listSeparator(','); // "123, 456, 789"

use Araga\FilamentInvertibleFields\Forms\Components\InvertibleTextInput;

InvertibleTextInput::make('values')
    ->listSeparator(','); // optional
bash
php artisan vendor:publish --tag="filament-invertible-fields-views"
php artisan vendor:publish --tag="filament-invertible-fields-translations"