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

@@ -67,7 +67,7 @@ class SchoolClassController extends Controller
$students = $class->students;
$studentsOnlyFIO = [];
foreach ($students as $student) {
array_push($studentsOnlyFIO, $student->only('id', 'name', 'surname', 'patronymic'));
array_push($studentsOnlyFIO, $student->only('id', 'name', 'surname', 'patronymic', 'photo'));
}
return response()->json($studentsOnlyFIO, 200);
}