blob: b86d710803be786b834d8eebae43b689c4422c15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<?php
use Illuminate\Support\Facades\Route;
//use Illuminate\Routing\Middleware\SubstituteBindings;
use Lightscale\ScormPlayer\Http\Controllers\ScormPlayerController;
Route::name('scorm-player.')->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);
});
|