Download the PHP package eolica/nova-pill-filter without Composer

On this page you can find all versions of the php package eolica/nova-pill-filter. 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 nova-pill-filter

A Laravel Nova filter that renders into clickable pills.

A simple Laravel Nova filter that renders into colorful clickable pills. This filter is very inspired by this other package, however we needed some extra features (like customizing the color of each pill) for client projects and that package seemed to not be maintained nor production ready, so we decided to make our own version of this filter.

Pill Filter

Installation

You can install the package in to a Laravel app that uses Nova via composer:

Usage

Creating the filter

You may create a new pill filter manually and extending the Eolica\NovaPillFilter\PillFilter class:

Or, even easier, using the following artisan command:

If you want to customize the "stub" the command uses to generate the filter class, you may use the following command to publish it:

Next, we must register the filter within the filters method of our resource:

Configuring the filter

By default multiple items can be selected, you can restrict it to a single item at time by using the single method

Also, the filter shows by default a "Clear" button when some item is active. When clicked, deactivates all items at once. If you want to hide the button you may use the hideClearButton method:

If you want the "Clear" button to show, you may also change the text within by using the clearLabel method, mainly for translation purposes:

Last, you may change the displaying mode of the filter, by default it wraps to show all pills at once, however you may change it to drag mode by using the draggable method:

Pill Filter

Configuring the filter options

The most simple way is to return a key/value pair array, the key being the label displayed within the pill:

You may customize each pill background color, text color, background color when active and text color when active, in this case the key of each option must be the value and the label text must be within the label key:

Applying the values to the query

The filter will send you an array containing the values that are active.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security

If you discover a security vulnerability within this package, please send an email at [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.


All versions of nova-pill-filter with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
laravel/nova Version ^3.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 eolica/nova-pill-filter contains the following files

Loading the files please wait ....