@extends('layouts.default') @section('title', 'Guestbook') @section('content') @php $db_alive = true; try { DB::connection()->getPdo(); } catch (Exception $e) { $db_alive = false; } @endphp @if (!$db_alive) @include('components.errors.db-error') @else
@csrf
{{ $errors->first('name') }}
{{ $errors->first('message') }}

A few things to note:

  • You can submit an entry once every hour.
  • Your IP address is logged but not publicly displayed.
  • Any entries that appear to be spam will be removed.

@php $entries = DB::select(' SELECT name, timestamp, message FROM guestbook__entries ORDER BY id DESC '); @endphp

Entries ({{ count($entries) }} total)

@foreach ($entries as $entry)
Submitted by {{ $entry->name }} on {{ gmdate('H:i:s - Y-m-d', $entry->timestamp) }}
{{ $entry->message }}

@endforeach @endif @stop