function addQuestion(Request $request) { $question = new Question(); $question->fill($request->all())->save(); $text = new Text(); $text->fill(['description' => $request->description, 'question_id' => $question->id]); $text->user_id = $request->user_id; $text->save(); $questions = $this->reloadQuestions($request->product_id); return ['questions' => $questions]; }