rudimentary "spam filter"

This commit is contained in:
floppydiskette 2024-12-27 18:47:40 +00:00
commit 3e97458ee2
6 changed files with 52 additions and 15 deletions

View file

@ -27,21 +27,7 @@ public function show(): View {
* @throws ValidationException
*/
public function addEntry(Request $request): RedirectResponse {
$this->validate($request, [
'name' => 'required',
'message' => 'required'
]);
GuestbookEntry::insertGuestbookEntry($request);
return back()->with('success', 'Entry submitted successfully!');
}
public function banIP(string $addr) {
// TODO: Add banning system
// $matching_bans = DB::select('SELECT reason FROM guestbook__bans WHERE ip_address = ?', array($request->ip()));
// if (!empty($matching_bans)) {
// return view('errors.guestbook-ipban')->with('reason', $matching_bans[0]->reason);
// }
}
}