From 33d15f4951f0cad02b32fc2f4ae12cfd0a6239f4 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 10 Oct 2024 02:03:20 -0600 Subject: [PATCH] Update ContactController --- app/Http/Controllers/ContactController.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/Http/Controllers/ContactController.php b/app/Http/Controllers/ContactController.php index 3123b8d16..dbba9599a 100644 --- a/app/Http/Controllers/ContactController.php +++ b/app/Http/Controllers/ContactController.php @@ -50,4 +50,15 @@ class ContactController extends Controller return redirect()->back()->with('status', 'Success - Your message has been sent to admins.'); } + + public function showAdminResponse(Request $request, $id) + { + abort_if(!$request->user(), 404); + $uid = $request->user()->id; + $contact = Contact::whereUserId($uid) + ->whereNotNull('response') + ->whereNotNull('responded_at') + ->findOrFail($id); + return view('site.contact.admin-response', compact('contact')); + } }