Explorar el Código

Update ContactController

Daniel Supernault hace 9 meses
padre
commit
33d15f4951
Se han modificado 1 ficheros con 11 adiciones y 0 borrados
  1. 11 0
      app/Http/Controllers/ContactController.php

+ 11 - 0
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'));
+    }
 }