This commit is contained in:
Neerholt 2020-06-29 13:20:59 +02:00
commit 5e226e03c4
4 changed files with 5 additions and 11 deletions

View File

@ -98,8 +98,9 @@ class ContactController extends Controller
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
* @param int $id
* @return \Illuminate\Http\RedirectResponse
* @throws \Exception
*/
public function destroy(Contact $id)
{

View File

@ -26,7 +26,7 @@
<td>{{ $contact->email }}</td>
<td>{{ $contact->phone }}</td>
<td><a href="{{ route("contacts.edit", [ "contact" => $contact ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
<td><a href="{{ route("contacts.destroy", [ "contact" => $contact ]) }}"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
<td><a href="{{ route("contacts.delete", [ "contact" => $contact ]) }}"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
</tr>
@endforeach
</table>

View File

@ -26,14 +26,7 @@
<td>{{$menuplan->wednesday}}</td>
<td>{{$menuplan->thursday}}</td>
<td><a href="{{ route("menu-plans.edit", [ "menu_plan" => $menuplan ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
<td>
<form method="post" action="{{ route("menu-plans.destroy", [ "menu_plan" => $menuplan ]) }}" class="w-100">
@csrf
@method("delete")
<button class="w-100" type="submit"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form>
</td>
<td><a href="{{ route("menu-plans.destroy", [ "menu_plan" => $menuplan ]) }}"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
</tr>
@endforeach
</table>