IsEmptyFilter/IsNotEmptyFilter

You're browsing the documentation for an old version of MoonShine. Consider upgrading your project to MoonShine 2.x.

Extends SwitchBooleanFilter * has the same features

Enables displaying only rows with empty (not empty for IsNotEmptyFilter) field values

Empty values are the following:

  • NULL
  • ''
  • 0
use MoonShine\Filters\IsEmptyFilter;
use MoonShine\Filters\IsNotEmptyFilter;
 
//...
 
public function filters(): array
{
return [
IsEmptyFilter::make('Url'),
IsNotEmptyFilter::make('Active')
];
}
 
//...