aboutsummaryrefslogtreecommitdiff
path: root/app/Http/Controllers/AdminGuestbookController.php
diff options
context:
space:
mode:
authorFrankie B <git@diskfloppy.me>2024-07-11 22:23:46 +0100
committerFrankie B <git@diskfloppy.me>2024-07-11 22:23:46 +0100
commit069cf70f5be260e6fcf44d80a9befca01e4c5ed6 (patch)
treeecb1efc8146ed3799bd42a093288f3102dc11a47 /app/Http/Controllers/AdminGuestbookController.php
parentccec714beed04d1585444c9321781b39db27f53d (diff)
Remove admin pages
Diffstat (limited to 'app/Http/Controllers/AdminGuestbookController.php')
-rw-r--r--app/Http/Controllers/AdminGuestbookController.php34
1 files changed, 0 insertions, 34 deletions
diff --git a/app/Http/Controllers/AdminGuestbookController.php b/app/Http/Controllers/AdminGuestbookController.php
deleted file mode 100644
index 5ebf451..0000000
--- a/app/Http/Controllers/AdminGuestbookController.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-namespace App\Http\Controllers;
-
-use App\Models\GuestbookEntry;
-use Illuminate\Support\Facades\DB;
-use Illuminate\View\View;
-use UAParser\Parser;
-
-class AdminGuestbookController extends Controller
-{
- function getGuestbookUniqueAddr(): int {
- $uniqueIpsCount = DB::table('guestbook__entries')->distinct()->count('ip');
- return $uniqueIpsCount;
- }
-
- function getGuestbookEntriesCount(): int {
- $entryCount = DB::table('guestbook__entries')->count();
- return $entryCount;
- }
- public function show() : View {
- $guestbook_unique_addr = $this->getGuestbookUniqueAddr();
- $guestbook_entry_count = $this->getGuestbookEntriesCount();
- $entries = GuestbookEntry::selectEntries();
- $parser = Parser::create();
-
- return view('admin.guestbook', [
- 'guestbook_unique_addr' => $guestbook_unique_addr,
- 'guestbook_entry_count' => $guestbook_entry_count,
- 'entries' => $entries,
- 'parser' => $parser,
- ]);
- }
-}