EscolaLMS/Courses-Import-Export

View on GitHub
src/Services/CloneCourseService.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace EscolaLms\CoursesImportExport\Services;

use EscolaLms\Courses\Models\Course;
use EscolaLms\CoursesImportExport\Jobs\CloneCourse;
use EscolaLms\CoursesImportExport\Services\Contracts\CloneCourseServiceContract;
use Exception;

class CloneCourseService implements CloneCourseServiceContract
{
    /**
     * @throws Exception
     */
    public function clone(Course $course): void
    {
        CloneCourse::dispatch($course, auth()->user());
    }
}