Download the PHP package ahoysolutions/query-filters without Composer

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

Query Filters

Installation

Step 1: Composer

From the command line, run:

Step 2: Service Provider

From within your Laravel application, open config/app.php and within the providers array, add:

This will bootstrap the package into Laravel for you.

Usage

Adding a filters class to a model

You can add a filter class through artisan command, just like with controllers, models, or other similar resources. For example, assuming you wanted to leverage filters on your Post model, you might use:

Afterwards, a new query filter class will be added to your directory.

Adding filter methods

To add a filter method to an filter class, simply add a function to the class. For example, assume you have an incoming request with a query string that looks like .

Your filters class might then look like this:

Filtering for an query string array

Imagine your user wants to search based on an array of different tags, for example:

As you can see, you don't have to do anything within the filter to allow the user to leverage this functionality.

The relevant query filter will then be called multiple times and apply the filter for each tag. This is good for checking against many-to-many relationships.

Adding sortable methods

You can specify that a field should be sortable by calling $this->resetOrderBy() before leveraging the builder, for example:

If you have multiple sortables, the latest one leveraged by the user will take precedence.

Credits


All versions of query-filters with dependencies

PHP Build Version
Package Version
Requires php Version ~7.0
illuminate/http Version ^5.4
illuminate/database Version ^5.4
illuminate/console Version ^5.4
illuminate/support Version ^5.4
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 ahoysolutions/query-filters contains the following files

Loading the files please wait ....