1
0
Fork 0
party-rank-server/app/ModelFilters/UserRankFilter.php

32 lines
556 B
PHP

<?php
namespace App\ModelFilters;
use EloquentFilter\ModelFilter;
class UserRankFilter extends ModelFilter
{
/**
* Related Models that have ModelFilters as well as the method on the ModelFilter
* As [relationMethod => [input_key1, input_key2]].
*
* @var array
*/
public $relations = [];
public function user($id)
{
$this->where('user_id', $id);
}
public function sn($sn)
{
$this->where('sn', $sn);
}
public function cate($id)
{
$this->where('cate_id', $id);
}
}