|
@@ -130,13 +130,6 @@ class PostController extends Controller
|
|
*/
|
|
*/
|
|
public function commentList(Request $request)
|
|
public function commentList(Request $request)
|
|
{
|
|
{
|
|
- $validator = Validator::make($request->all(), [
|
|
|
|
- 'post_id' => 'required|exists:post,id'
|
|
|
|
- ]);
|
|
|
|
- if ($validator->fails()) {
|
|
|
|
- return $this->response->error($validator->errors()->first(), 500);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
$commentList = $this->postRepository->commentList($request->all());
|
|
$commentList = $this->postRepository->commentList($request->all());
|
|
$fractal = new Manager();
|
|
$fractal = new Manager();
|
|
$resource = new Collection($commentList, new CommentTransformer());
|
|
$resource = new Collection($commentList, new CommentTransformer());
|