Backend for songs.zachdecook.com
* Gemini: Add index page
| -rwxr-xr-x | laravel/public/index.gmi | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/laravel/public/index.gmi b/laravel/public/index.gmi new file mode 100755 index 0000000..849d7b8 --- /dev/null +++ b/laravel/public/index.gmi @@ -0,0 +1,15 @@ +#!/usr/bin/php +<?php + +define('LARAVEL_START', microtime(true)); +require __DIR__.'/../vendor/autoload.php'; +require __DIR__.'/../load-eloquent.php'; +$app = require_once __DIR__.'/../bootstrap/app.php'; +$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 ?> + +<?php endforeach; ?> |