Backend for songs.zachdecook.com
Diffstat (limited to 'laravel/public/index.gmi')
-rwxr-xr-xlaravel/public/index.gmi11
1 files changed, 9 insertions, 2 deletions
diff --git a/laravel/public/index.gmi b/laravel/public/index.gmi
index 89db27b..492ed92 100755
--- a/laravel/public/index.gmi
+++ b/laravel/public/index.gmi
@@ -9,8 +9,15 @@ $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
use App\Song;
printf("20 text/gemini\r\n");
?>
-<?php foreach(Song::all()->pluck('title','id') as $id => $title): ?>
-=> /song.gmi.php/<?= $id ?> <?= $title ?>
+# Prosongsa Songs
+
+<?php foreach(['title','author'] as $key): ?>
+=> /?<?=$key?> Sort by <?=$key?>
+
+<?php endforeach; ?>
+
+<?php foreach(Song::all()->sortBy(getenv('QUERY_STRING')??'title')->pluck('title','id') as $id => $title): ?>
+=> /song.gmi.php/<?=$id?> <?= $title ?>
<?php endforeach; ?>