Update ContactController

This commit is contained in:
Daniel Supernault 2024-10-10 02:03:20 -06:00
parent 3004c438f1
commit 33d15f4951
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -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'));
}
}