Changed links to chapters, button to synchronize chapters from courses list, dark mode.

This commit is contained in:
Krzysztof Płaczek
2022-12-07 19:57:57 +01:00
parent 25e28f8193
commit d4d8330d83
7 changed files with 50 additions and 29 deletions

View File

@@ -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);