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.
15 lines
533 B
15 lines
533 B
/**
|
|
* 搜索
|
|
* @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%}
|
|
}
|
|
|