2024-06-11 17:02:01 +00:00
|
|
|
<x-layout>
|
|
|
|
<x-slot:title>Guestbook</x-slot:title>
|
2023-10-15 19:52:32 +00:00
|
|
|
<table class="gb-entry-form-container" role="presentation">
|
2023-07-25 23:08:58 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<form method="POST" action="/guestbook">
|
|
|
|
@csrf
|
2023-09-08 22:19:40 +00:00
|
|
|
<x-honeypot/>
|
2024-06-11 17:02:01 +00:00
|
|
|
<table class="form" role="presentation">
|
2023-07-25 23:08:58 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<label for="name"><strong>Name:</strong></label>
|
|
|
|
</td>
|
|
|
|
<td>
|
2023-11-27 20:30:32 +00:00
|
|
|
<input name="name" type="text" id="name">
|
2023-07-25 23:08:58 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<span class="text-danger">{{ $errors->first('name') }}</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<label for="message"><strong>Message:</strong></label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<textarea name="message" id="message" rows="3"></textarea>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<span class="text-danger">{{ $errors->first('message') }}</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td></td>
|
|
|
|
<td>
|
|
|
|
<button type="submit">Submit</button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
<td>
|
2024-01-22 00:09:05 +00:00
|
|
|
<p><i>A few things to note:</i></p>
|
2023-07-25 23:08:58 +00:00
|
|
|
<ul>
|
|
|
|
<li>You can submit an entry <u>once every hour</u>.</li>
|
2023-09-08 22:19:40 +00:00
|
|
|
<li>Your IP address is logged but <u>not</u> publicly displayed.</li>
|
2023-07-25 23:08:58 +00:00
|
|
|
<li>Any entries that appear to be spam <u>will</u> be removed.</li>
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
<hr>
|
2023-10-15 19:52:32 +00:00
|
|
|
<h2>Entries <small>({{ count($entries) }} total)</small></h2>
|
2023-07-16 00:49:09 +00:00
|
|
|
@foreach ($entries as $entry)
|
2024-01-26 12:26:37 +00:00
|
|
|
@php
|
|
|
|
$user_agent = $parser->parse($entry->agent);
|
|
|
|
@endphp
|
2024-08-08 01:00:44 +00:00
|
|
|
<div class="section">
|
|
|
|
Submitted by <strong>{{ $entry->name }}</strong>
|
|
|
|
on <strong>{{ $entry->created_at->format('Y-m-d') }}</strong>
|
|
|
|
at <strong>{{ $entry->created_at->format('h:i:s A (e)') }}</strong>
|
|
|
|
<hr>
|
|
|
|
<span class="guestbook-message">{{ $entry->message }}</span>
|
|
|
|
<hr>
|
|
|
|
@if($entry->agent === "Agent Unavailable")
|
|
|
|
<address>Agent unavailable</address>
|
|
|
|
@else
|
|
|
|
<address>Posted using <strong>{{ $user_agent->ua->toString() }}</strong>
|
|
|
|
on <strong>{{ $user_agent->os->toString() }}</strong></address>
|
|
|
|
@endif
|
|
|
|
</div>
|
2023-07-25 23:08:58 +00:00
|
|
|
<br>
|
2023-07-16 00:49:09 +00:00
|
|
|
@endforeach
|
2024-06-11 17:02:01 +00:00
|
|
|
</x-layout>
|