Info and filtering by course tracks, table of content on chapter view with links and previous and next buttons.
This commit is contained in:
1 parent
d4d8330d83
commit
5902bf7c2b
9 files changed
+1024
-477
No files matched your search
@@ -9,9 +9,9 @@ use Illuminate\Http\Request;
|
||||
|
||||
class Index extends Controller
|
||||
{
|
||||
public function index()
|
||||
public function index(string $track = null)
|
||||
{
|
||||
$courses = Course::with('chapters')->withCount('chapters')->get();
|
||||
$courses = Course::where('tracks', 'like', '%'.$track.'%')->with('chapters')->withCount('chapters')->get();
|
||||
|
||||
return view('index', compact(['courses']));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user