koel/routes/web.php

35 lines
1.2 KiB
PHP
Raw Normal View History

2016-09-26 06:30:00 +00:00
<?php
use App\Facades\iTunes;
2020-09-06 18:21:39 +00:00
use Illuminate\Support\Facades\Route;
Route::get('/', static function () {
2016-09-26 06:30:00 +00:00
return view('index');
});
Route::get('/remote', static function () {
return view('remote');
});
2020-09-06 21:11:48 +00:00
2020-09-07 21:03:22 +00:00
Route::group(['middleware' => 'auth', 'prefix' => 'web'], static function (): void {
Route::get('/{song}/play/{transcode?}/{bitrate?}', 'PlayController@show')
->name('song.play');
Route::group(['prefix' => 'lastfm'], static function (): void {
Route::get('connect', 'LastfmController@connect')->name('lastfm.connect');
Route::get('callback', 'LastfmController@callback')->name('lastfm.callback');
});
2020-09-06 21:11:48 +00:00
if (iTunes::used()) {
Route::get('itunes/song/{album}', 'iTunesController@viewSong')->name('iTunes.viewSong');
}
Route::group(['prefix' => 'download', 'namespace' => 'Download'], static function (): void {
Route::get('songs', 'SongController@show');
Route::get('album/{album}', 'AlbumController@show');
Route::get('artist/{artist}', 'ArtistController@show');
Route::get('playlist/{playlist}', 'PlaylistController@show');
Route::get('favorites', 'FavoritesController@show');
});
});