@extends('layout.app')
@section('title', $title)
@section('content')
    <form action="{{ route('produk.update', $row) }}" method="POST">
        <div class="card">
            <div class="card-body">
                <div class="row">
                    <div class="col-md-6">
                        {{ show_error($errors) }}
                        {{ csrf_field() }}
                        {{ method_field('PUT') }}
                        <div class="mb-3">
                            <label>Kode produk <span class="text-danger">*</span></label>
                            <input class="form-control" type="text" name="kode_produk"
                                value="{{ old('kode_produk', $row->kode_produk) }}" readonly>
                        </div>
                        <div class="mb-3">
                            <label>Nama <span class="text-danger">*</span></label>
                            <input class="form-control" type="text" name="nama_produk" value="{{ old('nama_produk', $row->nama_produk) }}">
                        </div>
                    </div>
                </div>
            </div>
            <div class="card-footer">
                <button class="btn btn-primary"><i class="fa fa-save"></i> Simpan</button>
                <a class="btn btn-danger" href="{{ URL('produk') }}"><i class="fa fa-arrow-left"></i> Kembali</a>
            </div>
        </div>
    </form>
@endsection
