From c50a589b50df8376bffa469aafecd20066daabf4 Mon Sep 17 00:00:00 2001 From: idugan100 Date: Mon, 11 Mar 2024 02:21:21 -0400 Subject: [PATCH 1/2] restyling and removing department from professor edit form --- app/Http/Controllers/ProfessorController.php | 1 - resources/views/professors/edit.blade.php | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/ProfessorController.php b/app/Http/Controllers/ProfessorController.php index f5683e1..b0c550a 100644 --- a/app/Http/Controllers/ProfessorController.php +++ b/app/Http/Controllers/ProfessorController.php @@ -152,7 +152,6 @@ public function update(UpdateProfessorRequest $request, Professor $professor): R $validated = $request->validate([ 'firstName' => 'required', 'lastName' => 'required', - 'department' => 'required', ]); $professor->update($validated); diff --git a/resources/views/professors/edit.blade.php b/resources/views/professors/edit.blade.php index 01442bb..7dfb684 100644 --- a/resources/views/professors/edit.blade.php +++ b/resources/views/professors/edit.blade.php @@ -1,7 +1,7 @@
-
id)}}" > + id)}}"> @csrf @method('put') @@ -13,12 +13,7 @@
- -
- - -
- +
\ No newline at end of file From e1d84517e5d856865d65ed1e9bfcde048d9dcf25 Mon Sep 17 00:00:00 2001 From: idugan100 Date: Mon, 11 Mar 2024 02:27:43 -0400 Subject: [PATCH 2/2] fixing professor edit form --- app/Http/Controllers/CourseController.php | 4 ---- resources/views/courses/edit.blade.php | 21 +++------------------ 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/app/Http/Controllers/CourseController.php b/app/Http/Controllers/CourseController.php index 6301049..1c120e7 100644 --- a/app/Http/Controllers/CourseController.php +++ b/app/Http/Controllers/CourseController.php @@ -126,10 +126,6 @@ public function update(UpdateCourseRequest $request, Course $course): RedirectRe 'description' => 'required', 'courseNumber' => 'required', 'departmentCode' => 'required', - 'creditsLecture' => 'nullable', - 'creditsLab' => 'nullable', - 'creditsTotal' => 'required', - 'syllabusLink' => 'nullable', ]); $course->update($validated); diff --git a/resources/views/courses/edit.blade.php b/resources/views/courses/edit.blade.php index baf97a2..d0381a1 100644 --- a/resources/views/courses/edit.blade.php +++ b/resources/views/courses/edit.blade.php @@ -18,28 +18,13 @@ - -
- +
- - -
-
- - -
-
- - -
-
- - +
- + @if ($errors->any())