public function debug() { $data = Questioner::presentQuestioner(); echo $data['questioner']->questioner_title . "\n"; foreach ($data['questions'] as $d) { echo $d->question . "\n"; } }
public function publishQuestioner($id) { Questioner::makePublic($id); }
public static function presentQuestioner() { //get active questioner $questioner = Questioner::where('active', '=', 1)->first(); $questions = Question::where('questioner_id', '=', $questioner->id)->get(); return array('questioner' => $questioner, 'questions' => $questions); }