/** * Show the form for creating a new resource. * * @return Response */ public function postCreate() { $data = Input::all(); $validator = Comment::validate($data); if ($validator->fails()) { return 404; } else { $content = Input::get('content'); $post_id = Input::get('post_id'); $cmt = Comment::create_cmt($content, $post_id); if (count($cmt)) { return 200; } else { return 404; } } }