Files
symfonycast.local/app/Http/Controllers/Index.php

24 lines
573 B
PHP

<?php
namespace App\Http\Controllers;
use App\Http\SymfonyCastDl\HtmlParser;
use App\Http\SymfonyCastDl\SymfonyCastDlService;
use App\Models\Course;
use Illuminate\Http\Request;
class Index extends Controller
{
public function index(string $track = null)
{
$courses = Course::where('tracks', 'like', '%'.$track.'%')->with('chapters')->withCount('chapters')->get();
return view('index', compact(['courses']));
}
public function download(SymfonyCastDlService $symfonyCastDlService)
{
$symfonyCastDlService->getInfo();
}
}