diff options
Diffstat (limited to 'routes/web.php')
-rw-r--r-- | routes/web.php | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/routes/web.php b/routes/web.php index 4570f11..8613ef7 100644 --- a/routes/web.php +++ b/routes/web.php @@ -2,23 +2,29 @@ use Illuminate\Support\Facades\Route; -//use Illuminate\Routing\Middleware\SubstituteBindings; - use Lightscale\ScormPlayer\Http\Controllers\ScormPlayerController; -Route::name('scorm-player.')->prefix('elearning')->middleware([ - 'web', +Route::name('scorm-player.')->prefix(config('scorm.route_prefix'))->middleware([ + config('scorm.middleware_group', 'web'), ])->group(function() { Route::get('scorm-player-{version}.js', [ScormPlayerController::class, 'jsSource']) ->name('javascript'); $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::prefix(config('scorm.route_prefix_scorm'))->group(function() { + Route::get('{sco}', 'scormLoad')->name('scorm.load'); + Route::post('{tracking}', 'scormCommit')->name('scorm.commit'); + }); + + Route::prefix(config('scorm.route_prefix_player')) + ->get('{module:uuid}', 'player') + ->name('player'); + + Route::prefix(config('scorm.route_prefix_files')) + ->get('{uuid}/{path}', 'serveModule') + ->where('path', '.*') + ->name('serve'); }; $route = Route::controller(ScormPlayerController::class); |