@extends('adminlte::page')

@section('title', 'Edit Visitor')

@section('content_header')
    <h1>Edit Visitor</h1>
@stop

@section('content')
<form action="{{ route('visitor.update', $visitor->id) }}" method="POST">
    @csrf
    @method('PUT')
    <div class="form-group">
        <label>Nama</label>
        <input type="text" name="nama" class="form-control" required value="{{ old('nama', $visitor->nama) }}">
    </div>
    <div class="form-group">
        <label>Alamat</label>
        <input type="text" name="alamat" class="form-control" required value="{{ old('alamat', $visitor->alamat) }}">
    </div>
    <div class="form-group">
        <label>Kontak</label>
        <input type="text" name="kontak" class="form-control" value="{{ old('kontak', $visitor->kontak) }}">
    </div>
    <button class="btn btn-primary">Update</button>
    <a href="{{ route('visitor.index') }}" class="btn btn-secondary">Kembali</a>
</form>
@stop