xtwoend / model
Simple model for hyperf/database
dev-master / 1.0.x-dev
2021-03-12 09:53 UTC
Requires
- hyperf/db-connection: ^2.1
- hyperf/utils: ^2.1
This package is auto-updated.
Last update: 2024-11-12 18:22:27 UTC
README
Installation
composer require xtwoend/model
Usage
use Xtwoend\Model\Model;
class User extends Model
{
}
Fitures
- Query Builder see https://laravel.com/docs/8.x/queries
- Sort
- Global filter
sort
// ?sort[id]=1&sort[name]=0&q=lorem
$users = User::allowedSorts('id','name)->allowedSearch('name', 'email', 'contains')->panginate();