updated Externallink. Should be able to do crud
This commit is contained in:
@@ -6,17 +6,18 @@
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="../external-links/edit.blade.php" class="text-white">Rediger Link</a> /
|
||||
<a href="{{route('external-links.edit', ['external_link' => $link])}}" class="text-white">Rediger Link</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<h1>Rediger Link:</h1>
|
||||
<form method="post" action="{{ route("external-links.edit", ['external_link' => $link]) }}">
|
||||
<form method="post" action="{{route("external-links.update", ["external_link" => $link])}}">
|
||||
@csrf
|
||||
@method("PUT")
|
||||
<label for="title">Titel:</label>
|
||||
<input type="text" name="title" id="title" required>
|
||||
<input value="{{$link->name}}" type="text" name="title" id="title" required>
|
||||
<label for="link">Linket:</label>
|
||||
<input type="text" name="link" id="link" required>
|
||||
<input value="{{$link->link}}" type="text" name="link" id="link" required>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@@ -21,8 +21,13 @@
|
||||
<tr>
|
||||
<th>{{$link->name}}</th>
|
||||
<th><a href="{{$link->link}}">{{$link->link}}</th>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
|
||||
<td><a href="{{ route("external-links.edit", [ "external_link" => $link ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td> <form method="post" action="{{ route("external-links.destroy", [ "external_link" => $link ]) }}" 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>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('external-links.index') }}" class="text-white">External link</a> /
|
||||
<a href="{{ route('external-links.edit', ["external_link" => $link]) }}" class="text-white">External link</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
|
||||
Reference in New Issue
Block a user