/** * Associate students. * * @param AssociateStudentRequest $request * @param int $classroom_id * @return array */ public function associateStudents(AssociateStudentRequest $request, $classroom_id) { $classroom = $this->repo->get($classroom_id); $this->repo->associateStudents($classroom, $request->only('students')); return ['status' => true]; }