generated from panliang/owl-admin-starter
26 lines
523 B
PHP
26 lines
523 B
PHP
<?php
|
|
|
|
namespace App\ModelFilters;
|
|
|
|
use EloquentFilter\ModelFilter;
|
|
|
|
class PartyCateFilter 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 ids($ids)
|
|
{
|
|
$this->whereIn('id', is_array($ids) ? $ids : explode(',', $ids));
|
|
}
|
|
public function name($name)
|
|
{
|
|
$this->whereLike('name', $name);
|
|
}
|
|
}
|