public static function getPollOptionsFromEid($eid) { $event = Event::find($eid); //Retrieving Polls for Display $polls = Poll::getEventPolls($eid); $all_poll_options = []; foreach ($polls as $poll) { $options = []; if (null != $poll) { $options = PollOption::getPollOptions($poll->pid); } array_push($all_poll_options, $options); } return $all_poll_options; }