xtwoend/model

Simple model for hyperf/database

dev-master / 1.0.x-dev 2021-03-12 09:53 UTC

This package is auto-updated.

Last update: 2022-05-12 12:24:25 UTC


README

Installation

composer require xtwoend/model

Usage

use Xtwoend\Model\Model;

class User extends Model
{

}

Fitures

  1. Query Builder see https://laravel.com/docs/8.x/queries
  2. Sort
  3. Global filter

sort

// ?sort[id]=1&sort[name]=0&q=lorem

$users = User::allowedSorts('id','name)->allowedSearch('name', 'email', 'contains')->panginate();