@extends('layout.app')
@section('title', $title)
@section('content')
    <form action="{{ route('periode.store') }}" method="POST">
        <div class="card">
            <div class="card-body">
                <div class="row">
                    <div class="col-md-6">
                        {{ show_error($errors) }}
                        {{ csrf_field() }}
                        <div class="mb-3">
                            <label>Kode <span class="text-danger">*</span></label>
                            <input class="form-control" type="text" name="kode_periode"
                                value="{{ old('kode_periode', kode_oto('kode_periode', 'tb_periode', 'A', 2)) }}" />
                        </div>
                        <div class="mb-3">
                            <label>Nama periode <span class="text-danger">*</span></label>
                            <input class="form-control" type="text" name="nama_periode"
                                value="{{ old('nama_periode') }}" />
                        </div>
                        <div class="mb-3">
                            <label>Keterangan</label>
                            <input class="form-control" type="text" name="keterangan" value="{{ old('keterangan') }}" />
                        </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="{{ route('periode.index') }}"><i class="fa fa-arrow-left"></i> Kembali</a>
            </div>
        </div>
    </form>
@endsection
