|
@@ -65,7 +65,7 @@ class StarNewsRepository
|
|
$starNew->updated_at = date('Y-m-d H:i:s');
|
|
$starNew->updated_at = date('Y-m-d H:i:s');
|
|
|
|
|
|
$open_news = $this->starNews->where('status',1)->count();
|
|
$open_news = $this->starNews->where('status',1)->count();
|
|
- if ($open_news >= 5 && $request['status'] == 1){
|
|
|
|
|
|
+ if ($open_news > 5 && $request['status'] == 1){
|
|
throw new HttpException(500, '最多开启5条新闻');
|
|
throw new HttpException(500, '最多开启5条新闻');
|
|
}
|
|
}
|
|
$res = $starNew->save();
|
|
$res = $starNew->save();
|