|
@@ -270,6 +270,10 @@ class PostController extends Controller
|
|
if ($validator->fails()) {
|
|
if ($validator->fails()) {
|
|
return jsonError($validator->errors()->first());
|
|
return jsonError($validator->errors()->first());
|
|
}
|
|
}
|
|
|
|
+ $exists = $this->postRepositories->detailExists($request['post_id']);
|
|
|
|
+ if (!$exists) {
|
|
|
|
+ return jsonError('获取内容信息失败');
|
|
|
|
+ }
|
|
$list = $this->postRepositories->commentList($request->all());
|
|
$list = $this->postRepositories->commentList($request->all());
|
|
$fractal = new Manager();
|
|
$fractal = new Manager();
|
|
$resource = new Collection($list, new CommentTransformer());
|
|
$resource = new Collection($list, new CommentTransformer());
|