middleware('signed') ->whereNumber('file') ->name('participant.application-file.download'); /** cxxfds-web 生产构建产出目录:public/admin */ Route::redirect('/admin', '/admin/', 301); Route::get('/admin/{path?}', function (?string $path = null) { if ($path !== null && $path !== '') { $candidate = public_path('admin/'.$path); if (File::isFile($candidate)) { return response()->file($candidate); } } $index = public_path('admin/index.html'); if (! File::exists($index)) { abort(503, 'Admin frontend not built. Run npm run build in cxxfds-web.'); } return response()->file($index, ['Content-Type' => 'text/html; charset=UTF-8']); })->where('path', '.*')->name('admin.spa');