Esempio n. 1
0
 /**
  * Delete a course.
  *
  * @param Course $course
  * @return mixed
  */
 public function deleteCourse(Course $course)
 {
     $result = \DB::transaction(function () use($course) {
         return $course->delete();
     });
     return $result;
 }
 /**
  * @param Course $course
  * @return \Illuminate\Http\RedirectResponse
  * @throws \Exception
  */
 public function destroy(Course $course)
 {
     $currency = Currency::where('id', $course->currency_id)->first();
     $currency->delete();
     $course->delete();
     return back();
 }