diff options
author | Sam Light <samlight1994@gmail.com> | 2022-09-07 10:31:49 +0100 |
---|---|---|
committer | Sam Light <samlight1994@gmail.com> | 2022-09-07 10:31:49 +0100 |
commit | 9635f686d30d86ac98d0b5f17308d71b024a6396 (patch) | |
tree | 603788e907518c51ec65ea2703567ecbbb660f46 /routes | |
parent | 32d2b58a55a13ce1b9949fc8f0d532f502eeeded (diff) |
Fixed route prefix issues
Diffstat (limited to 'routes')
-rw-r--r-- | routes/web.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/routes/web.php b/routes/web.php index 8613ef7..b6abc4f 100644 --- a/routes/web.php +++ b/routes/web.php @@ -17,12 +17,14 @@ Route::name('scorm-player.')->prefix(config('scorm.route_prefix'))->middleware([ Route::post('{tracking}', 'scormCommit')->name('scorm.commit'); }); - Route::prefix(config('scorm.route_prefix_player')) - ->get('{module:uuid}', 'player') + $prefix = config('scorm.route_prefix_player'); + $prefix = rtrim($prefix, '/'); + Route::get("{$prefix}/{module:uuid}", 'player') ->name('player'); - Route::prefix(config('scorm.route_prefix_files')) - ->get('{uuid}/{path}', 'serveModule') + $prefix = config('scorm.route_prefix_files'); + $prefix = rtrim($prefix, '/'); + Route::get("{$prefix}/{uuid}/{path}", 'serveModule') ->where('path', '.*') ->name('serve'); }; |