You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
533 B
16 lines
533 B
1 year ago
|
/**
|
||
|
* 搜索
|
||
|
* @param array $where
|
||
|
* @return \crmeb\basic\BaseModel
|
||
|
* @throws \ReflectionException
|
||
|
* @date {%DATE%}
|
||
|
*/
|
||
|
public function searchCrudModel(array $where = [], $field = ['*'], string $order = '', array $with = [])
|
||
|
{
|
||
|
return $this->getModel()->field($field)->when($order !== '', function ($query) use ($order) {
|
||
|
$query->order($order);
|
||
|
})->when($with, function ($query) use ($with) {
|
||
|
$query->with($with);
|
||
|
}){%CONTENT_SEARCH_PHP%}
|
||
|
}
|