mitirrli / tp-query
This package is abandoned and no longer maintained.
No replacement package was suggested.
model query for thinkphp.
1.1.0
2020-09-24 05:54 UTC
Requires
- php: >=7.1
- phpunit/phpunit: ~7
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
This package is auto-updated.
Last update: 2020-10-31 16:52:28 UTC
README
🌈 This package is deprecated, please use Mitirrli/build-query.
Environment
- PHP >= 7.0
Installation
$ composer require "mitirrli/tp-query"
QuickStart
use Mitirrli\TpQuery\Constant\Search;
$this->param($params)
->initial(['initial' => 0]) //Set an initial value
->key('name', Search::PERCENT_RIGHT) //Right fuzzy search
->key('avatar') //Accurate search
->key('phone', Search::PERCENT_ALL) //All fuzzy search
->inKey('type') //Array search
->betweenKey('created_at', 'started_at', 'ended_at') //Between search
->beforeKey('id'), //Before Key
->afterKey('id'), //After kay
->renameKey('backend', 'frontend') //Rename param
->unsetKey('initial') //Unset param
->result(); //Get result