Changed links to chapters, button to synchronize chapters from courses list, dark mode.
This commit is contained in:
@@ -4,11 +4,14 @@ namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\SymfonyCastDl\SymfonyCastDlService;
|
||||
use App\Models\Chapter;
|
||||
use App\Models\Course;
|
||||
|
||||
class ChapterController extends Controller
|
||||
{
|
||||
public function index(Chapter $chapter, SymfonyCastDlService $symfonyCastDlService)
|
||||
public function index(Course $course, int $chapter, SymfonyCastDlService $symfonyCastDlService)
|
||||
{
|
||||
$chapter = $course->chapters->firstWhere('order', $chapter);
|
||||
|
||||
$symfonyCastDlService->videoSize($chapter);
|
||||
if ($chapter->sync_offline) {
|
||||
$symfonyCastDlService->downloadFile($chapter);
|
||||
|
||||
Reference in New Issue
Block a user