查询:
if($request->filled('type')){ $where[] = ['type', strval(intval($request->input('type')))]; }
写入:
$model->type = '1'