1
0
mirror of https://github.com/robonen/education-project.git synced 2026-03-20 02:44:31 +00:00

Merge branch 'task' into journal

# Conflicts:
#	app/Http/Controllers/Users/StudentController.php
#	app/Models/SchoolClass.php
#	app/Models/Teacher.php
#	composer.json
#	composer.lock
#	database/migrations/2020_12_03_104028_create_bank_task_files_table.php
#	routes/api.php
This commit is contained in:
2020-12-16 23:08:17 +07:00
25 changed files with 608 additions and 68 deletions

View File

@@ -31,6 +31,18 @@ class StudentController extends Controller
return response()->json($student, 200);
}
/**
* Создание ученика
*
* @param StudentRequest $request
* @return JsonResponse
*/
/*public function store(StudentRequest $request)
{
$student = Student::creat($request->all());
return response()->json($student, 200);
}*/
/**
* Обновление ученика
*
@@ -54,11 +66,7 @@ class StudentController extends Controller
return response()->json(collect($student)->except('school_class'), 200);
}
public function destroy(Student $student)
{
$user = $student->user;
$user->delete();
return response()->json(null, 204);
public function getAnswers(Student $student) {
return AnswerToTask::where('student_id', '=', $student->id)->get();
}
}