Download the PHP package labrodev/laravel-filter-components without Composer

On this page you can find all versions of the php package labrodev/laravel-filter-components. 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 laravel-filter-components

labrodev/laravel-filter-components


This repo is Laravel package to extend filtering functionality in Laravel projects. If you have a list with items and you use spatie/laravel-query-builder to filter them, this package could be useful for you.

This package based on spatie/laravel-query-builder use case. We express our appreciation to Spatie for inspiring us, sharing valuable experiences, and providing exceptional Laravel packages that we not only extensively use but also wholeheartedly recommend.

QueryBuilder classes

In this package you may find some custom part of Query Builder to extend filtering logic.

DateRangeFilter

QueryBuilder class which implements a logic to filter by range of dates using WhereBetween.

IsNotNullFilter

QueryBuilder class which implements a logic to filter by whereNull or whereNotNull depend on the given input value. Could be used when we just need to filter by some flag behind which there is a logic (like: Have unpaid invoices - Yes/No).

WhereInFilter

QueryBuilder class which implements a logic to filter b whereIn using given array of values (good for multiple selects as filters).

View components

Also in this package you may find filter components that render filter component depends on type and logic.

You may public vendor views from this package to implement your own styles for filter components blade templates and to adjust it to your layout and theme.

By default filter components in blade use Bootstrap classes.

Boolean filter

View component to render a filter with select options No,Yes (or custom options defined in component attribute).

Custom select filter

View component to render a filter with custom select options as filter options.

Date range filter

View component to render a filter with two date inputs as date range (start date and end date).

Input filter

View component to render a filter with text input.

Multiple select field

View component to render a filter with multiple select options from given Eloquent Model.

Select field

View component to render a filter with select options from given Eloquent Model.

Link

View component to render a sort field.

Installation

You can install the package via composer:

Optionally, you can publish the views to implement them to your layout.

Optionally, you can publish the view components to extend the logic you need.

Usage

QueryBuilder classes

Let's assume that you are familiar with Spatie\QueryBuilder and already implemented filtering logic using Spatie\QueryBuilder.

You may extend usage by using QueryBuilder classes from this package: DateRangeFilter, WhereInFilter, IsNotNullFilter.

View components

Let's consider that you want to have a filtering in your CRUD list.

There could be a filter block. Let's assume to may have a form for your filters.

Boolean filter

Custom select filter

Date range filter

Input filter

Multiple select filter

Select filter

Link

Testing

PhpStan check

Changelog

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

Credits

License

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


All versions of laravel-filter-components with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
spatie/laravel-package-tools Version ^1.14.0
illuminate/contracts Version ^10.0
spatie/laravel-query-builder Version >=5.6.0
spatie/query-string Version >=1.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 labrodev/laravel-filter-components contains the following files

Loading the files please wait ....