Fixed Washing machine creation and editing
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('washing-machines.delete') }}" class="text-white">Fjern Vaskemaskine</a> /
|
||||
<a href="{{ route('washing-machines.destroy') }}" class="text-white">Fjern Vaskemaskine</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
|
||||
@@ -6,14 +6,15 @@
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('washing-machines.edit', ['id' => $user->id]) }}" class="text-white">Rediger Vaskemaskiner</a> /
|
||||
<a href="{{ route('washing-machines.edit', ['washing_machine' => $machine]) }}" class="text-white">Rediger Vaskemaskiner</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<form method="post" action="{{ route("washing-machines.store") }}">
|
||||
<form method="post" action="{{ route("washing-machines.update", [ 'washing_machine' => $machine]) }}">
|
||||
@csrf
|
||||
@method("put")
|
||||
<label for="name_first">Vaskemaskine Navn:</label>
|
||||
<input type="text" name="name" id="name" max="60" required>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||
<input type="text" name="name" id="name" max="60" value="{{$machine->name}}" required>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
</tr>
|
||||
@foreach($machines as $machine)
|
||||
<tr>
|
||||
<td>{Navn}</td>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route("washing-machines.destroy", [ "machine" => $machine ]) }}" class="w-100 nostyle">
|
||||
<td>{{$machine->name}}</td>
|
||||
<td><a href="{{ route('washing-machines.edit', [ 'washing_machine' => $machine ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route('washing-machines.destroy', [ 'washing_machine' => $machine ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user