@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | public function store($id) |
31 | 31 | { |
32 | 32 | try { |
33 | - $course = DB::transaction(function () use ($id) { |
|
33 | + $course = DB::transaction(function() use ($id) { |
|
34 | 34 | $course = Course::findOrFail($id); |
35 | 35 | Auth::student()->enroll($course); |
36 | 36 | |
@@ -53,10 +53,10 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function destroy($id) |
55 | 55 | { |
56 | - DB::transaction(function () use ($id) { |
|
56 | + DB::transaction(function() use ($id) { |
|
57 | 57 | $course = Course::findOrFail($id); |
58 | 58 | $enrollment = Auth::student()->getEnrollmentByCourseId($course); |
59 | - if ($enrollment && (! $enrollment->hasShift())) { |
|
59 | + if ($enrollment && ( ! $enrollment->hasShift())) { |
|
60 | 60 | Auth::student()->unenroll($course); |
61 | 61 | flash("You have successfully deleted the enrollment in {$course->name}.")->success(); |
62 | 62 | } else { |