PHP code example of webbingbrasil / filament-advancedfilter

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

    

webbingbrasil / filament-advancedfilter example snippets

 
php artisan vendor:publish --tag="filament-advancedfilter-translations"

use Webbingbrasil\FilamentAdvancedFilter\Filters\BooleanFilter;

BooleanFilter::make('is_active')

BooleanFilter::make('is_active')->nullsAreUnknown();
BooleanFilter::make('is_active')->nullsAreTrue();
BooleanFilter::make('is_active')->nullsAreFalse();
BooleanFilter::make('is_active')->showUnknowns();
BooleanFilter::make('is_active')->hideUnknowns();

use Webbingbrasil\FilamentAdvancedFilter\Filters\DateFilter;

DateFilter::make('published_at')

use Webbingbrasil\FilamentAdvancedFilter\Filters\NumberFilter;

NumberFilter::make('quantity')

use Webbingbrasil\FilamentAdvancedFilter\Filters\TextFilter;

TextFilter::make('name')

use Webbingbrasil\FilamentAdvancedFilter\Filters\TextFilter;
use Webbingbrasil\FilamentAdvancedFilter\Filters\BooleanFilter;

FilamentAdvancedFilter\Filters\TextFilter::make('brand')
    ->relationship('brand', 'name')
    ->default(FilamentAdvancedFilter\Filters\TextFilter::CLAUSE_CONTAIN);
    
FilamentAdvancedFilter\Filters\BooleanFilter::make('is_visible')
    ->default(FilamentAdvancedFilter\Filters\BooleanFilter::CLAUSE_IS_FALSE);

use Webbingbrasil\FilamentAdvancedFilter\Filters\TextFilter;

FilamentAdvancedFilter\Filters\TextFilter::make('brand')
    ->enableClauseLabel()

use Webbingbrasil\FilamentAdvancedFilter\Filters\TextFilter;

FilamentAdvancedFilter\Filters\TextFilter::make('brand')
    ->enableClauseLabel()
    ->wrapperUsing(fn () => Forms\Components\Group::make())

use Webbingbrasil\FilamentAdvancedFilter\Filters\TextFilter;

FilamentAdvancedFilter\Filters\TextFilter::make('brand')
    ->debounce(700)