Skip to content

Commit

Permalink
Course management temp (#56)
Browse files Browse the repository at this point in the history
* Create dummy controller, model and route for semesters (#39)

* 33 UI create a component for course  ilos (#46)



Co-authored-by: IsharaEkanayaka <[email protected]>
Co-authored-by: Hasan10100 <[email protected]>
Co-authored-by: Nuwan Jaliyagoda <[email protected]>
  • Loading branch information
3 people authored Aug 30, 2024
1 parent cfd1be3 commit 4cdcd1a
Show file tree
Hide file tree
Showing 14 changed files with 12,482 additions and 80 deletions.
11 changes: 5 additions & 6 deletions app/Http/Controllers/Backend/CourseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function store(Request $request)
}
}


/**
* Show the form for editing the specified course.
*
Expand Down Expand Up @@ -102,7 +102,7 @@ public function update(Request $request, Course $course)
try {
$course->update($validatedData);
return redirect()->route('dashboard.courses.index')->with('success', 'Course updated successfully.');
} catch (\Exception $e) {
} catch (\Exception $e) {
return abort(500);
}
}
Expand All @@ -114,19 +114,18 @@ public function update(Request $request, Course $course)
* @return \Illuminate\Http\Response
*/

public function delete(Course $course)
public function delete(Course $course)
{
return view('backend.courses.delete', compact('course'));
}

public function destroy(Course $course)
{
try{
try {
$course->delete();
return redirect()->route('dashboard.courses.index')->with('success', 'Course deleted successfully.');
} catch (\Exception $e) {
return abort(500);
}
}

}
}
53 changes: 52 additions & 1 deletion public/css/backend.css

Large diffs are not rendered by default.

Loading

0 comments on commit 4cdcd1a

Please sign in to comment.