Ekapp/skolehjem/resources/views/admin/washing-machines/edit.blade.php

31 lines
1.2 KiB
PHP

@extends("admin.layout.base")
@extends("admin.layout.header")
@section("title")
Vaskemaskine - Rediger
@endsection
@section("path")
<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.update", [ 'washing_machine' => $machine]) }}">
@csrf
@method("put")
<label for="name_first">Vaskemaskine Navn:</label>
<input type="text" name="name" id="name" max="60" value="{{$machine->name}}" required>
<select class="w-100" name="location_id" id="location_id" class="mb-2" required>
<option disabled> -- Vælg Lokation -- </option>
@foreach($locations as $location)
{{ $selected = "" }}
@if($machine->location_id == $location->id)
{{ $selected = "selected" }}
@endif
<option {{ $selected }} value="{{ $location->id }}">{{ $location->name }}</option>
@endforeach
</select>
<input type="submit" class="btn btn-dark text-white" value="Rediger">
</form>
@endsection