Download the PHP package laravelway/query-filters without Composer

On this page you can find all versions of the php package laravelway/query-filters. 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 query-filters

Readme

This package can be used for filtering eloquent using query string.

First you have to use QueryFilters trait in your model.

Then you can use addQueryFilters scope on your model to add any filters you want.

  1. Using array of filters

In this case it will filter by name parameter and email parameter from query string.

  1. You can call addQueryFilters multiple times. It will merge all filters together.

  2. You can use callbacks as filters.

  3. You can use filters classes to define all filters there. In that case class must be extended from FiltersAbstract class.

As you can see, you can define standard filters in $filters property as array, or you can define custom functions which are prefixed with filter word. In our case filterSearch is using as filtering function, it means that it will filter by query parameter search.

There are some standard filtering classes you can use for filtering.

EqualFilter

it filters for exact value.

ContainsFilter

It filters rows which are contains that value in any part of string.

ContainsInFilter

This filter can be used if we need to filter for value can be found on multiple columns. Usually it used then user types something in one search input, but we must filter rows where that value can be found on one of the following columns.

LikeFilter

This filter is similar to ContainsFilter, but contains will find in any part of string, but with like filter, you can specify in query string via * which part of string sould contain a value.

TrashedFilter

This filter is using to filter deleted rows if model uses SoftDeletes trait.

DateFilter

This filter is using for filter dates.


TODO


All versions of query-filters with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.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 laravelway/query-filters contains the following files

Loading the files please wait ....