|
@@ -27,6 +27,15 @@ class TopicRepository {
|
|
|
if(isset($request['name'])){
|
|
|
$where[] = ['name', 'like', "%{$request['name']}%"];
|
|
|
}
|
|
|
+ if(isset($request['is_suggest'])){
|
|
|
+ $where[] = ['is_suggest', $request['is_suggest']];
|
|
|
+ }
|
|
|
+ if(isset($request['is_hot'])){
|
|
|
+ $where[] = ['is_hot', $request['is_hot']];
|
|
|
+ }
|
|
|
+ if(isset($request['is_open'])){
|
|
|
+ $where[] = ['is_open', $request['is_open']];
|
|
|
+ }
|
|
|
return $this->topic->where($where)->paginate($perPage);
|
|
|
}
|
|
|
public function create($request){
|