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

Исправление кода в контроллерах

This commit is contained in:
ashen-1-dev
2020-12-18 03:02:31 +07:00
parent 654947873e
commit 98f2d8f65b
6 changed files with 33 additions and 26 deletions

View File

@@ -16,9 +16,10 @@ class AnswerToTaskController extends Controller
$input = $request->all();
$answer = AnswerToTask::create($input+
['task_id' => $task->id,
'student_id' => auth()->user()->id]);
$answer = AnswerToTask::create($input+ [
'task_id' => $task->id,
'student_id' => $request->student_id
]); //auth()->user()->id]
return response()->json($answer, 201);
}