public static function deleteEventPolls($eid) { $polls = DB::table('polls')->where('eid', $eid)->get(); foreach ($polls as $poll) { PollOption::deletePollOptions($poll->pid); } return DB::table('polls')->where('eid', $eid)->delete(); }