website/app/routes/apiv1/music.php

15 lines
279 B
PHP
Raw Normal View History

<?php
// music design #1
$app->get('/apiv1/music/get-album/:albumid', function($albumid) use($app) {
$album = $app->album->where('id', $albumid)->first();
if ($album) {
echo json_encode($album);
} else {
echo 'Not found';
}
})->name('apiv1.music.get-album');