|
@@ -62,7 +62,7 @@ class TopicController extends Controller {
|
|
|
//详情
|
|
|
public function view(Request $request){
|
|
|
$validator = Validator::make($request->all(), [
|
|
|
- 'id' => 'required|integer|max:12',
|
|
|
+ 'id' => 'required|integer',
|
|
|
]);
|
|
|
if ($validator->fails()) {
|
|
|
return $this->response->error($validator->errors()->first(), 500);
|
|
@@ -77,6 +77,7 @@ class TopicController extends Controller {
|
|
|
'img' => 'required|url',
|
|
|
'desc' => 'required|string|max:100',
|
|
|
'category_ids' => 'required|string',
|
|
|
+ 'base_count' => 'min:1|max:10000',
|
|
|
]);
|
|
|
if ($validator->fails()) {
|
|
|
return $this->response->error($validator->errors()->first(), 500);
|
|
@@ -91,6 +92,7 @@ class TopicController extends Controller {
|
|
|
'img' => 'required|url',
|
|
|
'desc' => 'required|string|max:100',
|
|
|
'category_ids' => 'required|string',
|
|
|
+ 'base_count' => 'min:1|max:10000',
|
|
|
]);
|
|
|
if ($validator->fails()) {
|
|
|
return $this->response->error($validator->errors()->first(), 500);
|