From 08908a314cb75dbcf51e6221c2f2c49d3a55d17f Mon Sep 17 00:00:00 2001 From: Sam Light Date: Mon, 5 Sep 2022 09:45:04 +0100 Subject: Implemented majority of the player functionality --- routes/web.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 routes/web.php (limited to 'routes') diff --git a/routes/web.php b/routes/web.php new file mode 100644 index 0000000..b86d710 --- /dev/null +++ b/routes/web.php @@ -0,0 +1,29 @@ +prefix('elearning')->middleware([ + 'web', +])->group(function() { + + $group = function() { + Route::get('/scorm/{sco}', 'scormLoad')->name('scorm.load'); + Route::post('/scorm/{tracking}', 'scormCommit')->name('scorm.commit'); + + Route::get('{module:uuid}', 'player')->name('player'); + Route::get('files/{uuid}/{path}', 'serveModule')->name('serve')->where('path', '.*'); + }; + + $route = Route::controller(ScormPlayerController::class); + $middleware = config('scorm.middleware'); + + if(!empty($middleware)) { + $route->middleware($middleware); + } + + $route->group($group); +}); -- cgit v1.2.3