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:
nikden13
2020-12-13 16:31:06 +07:00
parent 2e2942e42c
commit c93ffe8b0f
10 changed files with 63 additions and 17 deletions

View File

@@ -31,18 +31,6 @@ 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);
}*/
/**
* Обновление ученика
*
@@ -65,4 +53,12 @@ class StudentController extends Controller
$new_class->save();
return response()->json(collect($student)->except('school_class'), 200);
}
public function destroy(Student $student)
{
$user = $student->user;
$user->delete();
return response()->json(null, 204);
}
}