Download the PHP package paliari/doctrine-ransack without Composer
On this page you can find all versions of the php package paliari/doctrine-ransack. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download paliari/doctrine-ransack
More information about paliari/doctrine-ransack
Files in paliari/doctrine-ransack
Package doctrine-ransack
Short Description Advanced query searching for Doctrine ORM (based on Ruby on Rails Ransack)
License MIT
Homepage https://github.com/paliari/doctrine-ransack
Informations about the package doctrine-ransack
doctrine-ransack
Installation
$ composer require paliari/doctrine-ransack
Configuration
Your setup, example
Usage
Custom Association
Your class of get custom association
Setup with CustomAssociation
Filters
The filters must be passed in a hash with the name of
the key containing the field ending with the predicates
below ex: person.name_eq
, person.id_gt
.
It is also possible to combine predicates within or
or and
clauses, eg:
List of all possible predicates
-
*_eq (equal)
-
Example:
- SQL result:
-
-
*_not_eq (not equal)
-
Example:
- SQL result:
-
-
*_in (match any values in array)
-
Example:
- SQL result:
-
-
*_not_in (match none of values in array)
-
Example:
- SQL result:
-
-
*_null (is null)
-
Example:
- SQL result:
-
-
*_not_null (is not null)
-
Example:
- SQL result:
-
-
*_present (not null and not empty)
Only compatible with string columns.
-
Example:
- SQL result:
-
-
*_blank (is null or empty)
Only compatible with string columns.
-
Example:
- SQL result:
-
-
*_lt (less than)
-
Example:
- SQL result:
-
-
*_lteq (less than or equal to)
-
Example:
- SQL result:
-
-
*_gt (greater than)
-
Example:
- SQL result:
-
-
*_gteq (greater than or equal to)
-
Example:
- SQL result:
-
-
*_matches (matches with
LIKE
)-
Example:
- SQL result:
-
-
*_not_matches (does not match with
LIKE
)-
Example:
- SQL result:
-
-
*_cont (contains value)
-
Example:
- SQL result:
-
-
*_not_cont (does not contain)
-
Example:
- SQL result:
-
-
*_start (starts with)
-
Example:
- SQL result:
-
-
*_not_start (does not start with)
-
Example:
- SQL result:
-
-
*_end (ends with)
-
Example:
- SQL result:
-
-
*_not_end (does not end with)
-
Example:
- SQL result:
-
-
*_between (between in 2 values)
-
Example:
- SQL result:
-