public static function comment($type, $data) { if ($type == 'id') { return Post_Comment::findOrFail($data); } return Post_Comment::where($type, $data)->first(); }