Download the PHP package kingmaker/filament-filter-sets without Composer

On this page you can find all versions of the php package kingmaker/filament-filter-sets. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-filter-sets

Filament Filter Sets

Packagist Version Packagist Downloads Filament Run PHPUnit Tests License

Predefined filter sets for Filament tables — apply a whole combination of table filters in one click, from a dropdown in the table toolbar.

A filter set is a named bundle of filter state. Instead of asking a user to open the filters panel and set four fields to find "unread quick reads", you declare that combination once and they pick it from a list.

Requirements

Package Filament Laravel PHP
1.x 4 or 5 11.28+ 8.2+

Installation

The service provider is auto-discovered. There is nothing to publish and no trait to add.

Usage

Call filterSets() on the table, alongside your existing filters():

A swatch icon appears next to the table's search field. Opening it lists every set; clicking one applies it.

The FilterSet API

Method Description
make(string $name) Creates the set. The name is also the identifier passed to applyTableFilterSet().
label(string $label) The text in the dropdown. Defaults to Str::headline($name) — unread_quick_reads becomes Unread Quick Reads.
icon(string\|BackedEnum\|null $icon) An icon for the dropdown item. Accepts an icon name or Filament's Heroicon enum.
color(?string $color) A Filament colour for the dropdown item, e.g. success.
filters(array\|Closure $filters) The filter form state to apply, keyed by filter name.

The array passed to filters() is the same shape the table's filters form uses: the outer key is the filter name, the inner array is that filter's own form state. A filter with a single field — like TernaryFilter — takes ['value' => ...]; a custom Filter with a schema takes one key per field.

Runtime values

filters() also accepts a Closure, resolved every time the set is read. Use it for anything that depends on the current request:

Applying a set programmatically

Every component with a table gains a virtual applyTableFilterSet() method, so you can trigger a set from your own Blade or Livewire code:

Behaviour

Customisation

Publish the trigger view to change the icon, placement or markup:

Publish the translations to change the trigger's label, or to translate it:

Testing

Filter sets are exercised like any other Livewire call:

To run this package's own suite:

Changelog

See CHANGELOG.md.

License

The MIT License (MIT). See LICENSE.md.


All versions of filament-filter-sets with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/tables Version ^4.0|^5.0
illuminate/contracts Version ^11.28|^12.0|^13.0
livewire/livewire Version ^3.5|^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kingmaker/filament-filter-sets contains the following files

Loading the files please wait ...