From 4b44f24be45b0ffc2a92bb567a984c4d6df1eec0 Mon Sep 17 00:00:00 2001 From: Anders <anders164a@gmail.com> Date: Mon, 17 Aug 2020 08:26:01 +0200 Subject: [PATCH] v0.9.15f - Fixed Feedback backend --- skolehjem/app/Http/Controllers/FeedbackController.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/skolehjem/app/Http/Controllers/FeedbackController.php b/skolehjem/app/Http/Controllers/FeedbackController.php index 83c6157..6fbedac 100644 --- a/skolehjem/app/Http/Controllers/FeedbackController.php +++ b/skolehjem/app/Http/Controllers/FeedbackController.php @@ -135,7 +135,8 @@ class FeedbackController extends Controller $output = "<tr>". "<th>Feedback Besked</th>". "<th>Ris el. Ros</th>". - "</tr>"; + "<th style=\"width: 1em;\"><img class=\"w-100\" src=\"http://127.0.0.1:8000/images/icons/trashcan.svg\" alt=\"Delete\"></th>". + "</tr>"; //$value = Feedbacks::query('feedbacks')->select('suggestion_form ')->dump(); //$value = DB::table('feedbacks')->select('suggestion_form ')->dump(); @@ -150,6 +151,13 @@ class FeedbackController extends Controller $output.='<tr>'. '<td>' . $feedback->message . '</td>'. '<td>' . $feedback->suggestion_form . '</td>'. + '<td><form method="post" action="' .route("feedbacks.destroy", [ "feedback" => $feedback ]). '" class="w-100 nostyle">'. + csrf_field(). + method_field("delete"). + + '<button class="w-100 nostyle" onclick="return confirm(\'Are you sure you want to delete?\');" type="submit"><img class="w-100 cursor-pointer" src="'. asset('/images/icons/trashcan-dark.svg') . '" alt="Delete"></button>'. + '</form>'. + '</td>'. '</tr>'; } }