mirror of
https://github.com/robonen/education-project.git
synced 2026-03-20 02:44:31 +00:00
Модуль Задания
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Users;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\StudentRequest;
|
||||
use App\Models\AnswerToTask;
|
||||
use App\Models\SchoolClass;
|
||||
use App\Models\Student;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
@@ -65,4 +66,8 @@ class StudentController extends Controller
|
||||
$new_class->save();
|
||||
return response()->json(collect($student)->except('school_class'), 200);
|
||||
}
|
||||
|
||||
public function getAnswers(Student $student) {
|
||||
return AnswerToTask::where('student_id', '=', $student->id)->get();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user