website/app/routes/pages/music.php

28 lines
577 B
PHP
Raw Normal View History

2015-08-30 12:34:43 -04:00
<?php
// music design #1
$app->get('/music1', function() use($app) {
$albums = $app->album->all()->sortByDesc('release_date')->values()->all();
$songs = $albums[0]->songs;
2016-04-20 23:11:33 -04:00
$app->render('pages/music1.twig', [
'albums' => $albums,
'songs' => $songs,
]);
2015-08-30 12:34:43 -04:00
})->name('music1');
# music design #2
$app->get('/music2', function() use($app) {
$albums = $app->album->all()->sortByDesc('release_date')->values()->all();
$songs = $albums[0]->songs;
$app->render('pages/music2.twig', [
'albums' => $albums,
'songs' => $songs,
]);
})->name('music2');