/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $users = Question_Option::all(); return $this->respond(['data' => $this->QuestionOptionTransformer->transformCollection($users->toArray())]); }
public function getQuestionOptions($question_id) { return Question_Option::where('question_id', '=', $question_id)->get(); }