Fixed Washing machine creation and editing

This commit is contained in:
frederikpyt
2020-07-01 10:30:28 +02:00
parent 6ecc96ef55
commit 2846dac2dc
5 changed files with 38 additions and 25 deletions
@@ -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