website/app/routes/apiv1/music.php
2016-11-28 17:06:04 -05:00

15 lines
279 B
PHP

<?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');