public function check_validity_to_post_status($ans_id, $u_id) { $valid_status = Answers_status::where('user_id', $u_id)->where('answer_id', $ans_id)->get()->toArray(); if (count($valid_status) > 0) { return TRUE; } else { return FALSE; } }