group(static function (): void { Route::get('/', static fn () => view('index')); Route::get('remote', static fn () => view('remote')); Route::middleware('auth')->group(static function (): void { Route::prefix('lastfm')->group(static function (): void { Route::get('connect', [LastfmController::class, 'connect'])->name('lastfm.connect'); Route::get('callback', [LastfmController::class, 'callback'])->name('lastfm.callback'); }); if (ITunes::used()) { Route::get('itunes/song/{album}', ViewSongOnITunesController::class)->name('iTunes.viewSong'); } }); Route::middleware('audio.auth')->group(static function (): void { Route::get('play/{song}/{transcode?}/{bitrate?}', PlayController::class)->name('song.play'); if (config('koel.download.allow')) { Route::prefix('download')->group(static function (): void { Route::get('songs', DownloadSongsController::class); Route::get('album/{album}', DownloadAlbumController::class); Route::get('artist/{artist}', DownloadArtistController::class); Route::get('playlist/{playlist}', DownloadPlaylistController::class); Route::get('favorites', DownloadFavoritesController::class); }); } }); });