@extends('layouts.default') @section('title', 'guestbook') @section('content')
@csrf
{{ $errors->first('name') }}
{{ $errors->first('message') }}

A few things to note:


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

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

@foreach ($entries as $entry)
Name: {{ $entry->name }}
Date: {{ gmdate("H:i:s - Y-m-d", $entry->timestamp) }}

{{ $entry->message }}
@endforeach @stop