PHPackages                             darxide-pl/cakephp-filter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. darxide-pl/cakephp-filter

ActiveCakephp-plugin[Search &amp; Filtering](/categories/search)

darxide-pl/cakephp-filter
=========================

Filtering Queries plugin with extended FormHelper for CakePHP

1.0(7y ago)0109MITPHP

Since Mar 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/darxide-pl/cakephp-filter)[ Packagist](https://packagist.org/packages/darxide-pl/cakephp-filter)[ RSS](/packages/darxide-pl-cakephp-filter/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Filter plugin for CakePHP
=========================

[](#filter-plugin-for-cakephp)

Installation
------------

[](#installation)

You can install this plugin into your CakePHP application using [composer](https://getcomposer.org).

The recommended way to install composer packages is:

```
composer require darxide-pl/cakephp-filter

```

Intro
-----

[](#intro)

In real life applications, filtering queries by user input can quickly growth into enormous queries controlled by tons of inputs.

The main idea of this plugin is keep the code clean and readable.

Every query can have many filters as separated methods in `App\Model\Filter` namespace, and queries are passed into these filters as parameters, so filters are easy to test and maintain.

Plugin allows you to filtering queries using get variables, post variables, json input.

Plugin has also implemented "memory" of filter in session (optional) and has easily extendable interfaces to help You with write your own implementations.

There are also `FilterForm` Helper which helps with building forms with filters.

Quick example
-------------

[](#quick-example)

1. cmd: `./bin/cake plugin load Filter`
2. Load helper in `/src/View/AppView.php`

```
