@include('components.theme.pages.header')

<section>
    <!-- basic table -->
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    {{ Form::open(['route' => 'alternatif.store']) }}
                    @csrf
                    @if(session()->has('success'))
                        <div class="alert alert-success">
                            {{ session()->get('success') }}
                        </div>
                    @else
                        @if(session()->has('error'))
                            <div class="alert alert-danger">
                                {{ session()->get('error') }}
                            </div>
                        @endif
                    @endif
                    <div class="form-group mb-3">
                        <label for="exampleEmail1">Kode Alternatif</label>
                        <input type="text" class="form-control form-control-user {{ $errors->has('id_alternatif') ? 'is-invalid' : '' }}" id="email" name="id_alternatif" aria-describedby="emailHelp" placeholder="Enter Kode Alternatif." value="<?= old('id_alternatif') ?>">
                        @if($errors->has('id_alternatif'))<span class="small text-danger mt-2">{{ $errors->first('id_alternatif') }}</span>@endif
                    </div>
                    <div class="form-group mb-3">
                        <label for="exampleEmail1">Nama Alternatif</label>
                        <input type="text" class="form-control form-control-user {{ $errors->has('nama_alternatif') ? 'is-invalid' : '' }}" id="email" name="nama_alternatif" aria-describedby="emailHelp" placeholder="Enter Nama Alternatif." value="<?= old('nama_alternatif') ?>">
                        @if($errors->has('nama_alternatif'))<span class="small text-danger mt-2">{{ $errors->first('nama_alternatif') }}</span>@endif
                    </div>
                    <div class="form-group mb-3">
                        <label for="exampleEmail1">Usia Ayam (hari)</label>
                        <input type="text" class="form-control form-control-user {{ $errors->has('usia_ayam') ? 'is-invalid' : '' }}" id="email" name="usia_ayam" aria-describedby="emailHelp" placeholder="Usia Ayam" value="<?= old('usia_ayam') ?>">
                        @if($errors->has('usia_ayam'))<span class="small text-danger mt-2">{{ $errors->first('usia_ayam') }}</span>@endif
                    </div>
                    <div class="form-group mb-3">
                        <label for="exampleEmail1">Berat (kg)</label>
                        <input type="text" class="form-control form-control-user {{ $errors->has('berat') ? 'is-invalid' : '' }}" id="email" name="berat" aria-describedby="emailHelp" placeholder="Berat Ayam" value="<?= old('berat') ?>">
                        @if($errors->has('berat'))<span class="small text-danger mt-2">{{ $errors->first('berat') }}</span>@endif
                    </div>
                    <div class="form-group mb-3">
                        <label for="exampleEmail1">Konsumsi Pakan (gr)</label>
                        <input type="text" class="form-control form-control-user {{ $errors->has('konsumsi_pakan') ? 'is-invalid' : '' }}" id="email" name="konsumsi_pakan" aria-describedby="emailHelp" placeholder="Pakan Ayam" value="<?= old('konsumsi_pakan') ?>">
                        @if($errors->has('konsumsi_pakan'))<span class="small text-danger mt-2">{{ $errors->first('konsumsi_pakan') }}</span>@endif
                    </div>
                    <div class="form-group mb-3">
                        <label for="exampleEmail1">Vitamin (mg)</label>
                        <input type="text" class="form-control form-control-user {{ $errors->has('vitamin') ? 'is-invalid' : '' }}" id="email" name="vitamin" aria-describedby="emailHelp" placeholder="Vitamin Ayam" value="<?= old('vitamin') ?>">
                        @if($errors->has('vitamin'))<span class="small text-danger mt-2">{{ $errors->first('vitamin') }}</span>@endif
                    </div>
                    <div class="form-group mb-3">
                        <label for="exampleEmail1">Kandang</label>
                        <input type="text" class="form-control form-control-user {{ $errors->has('kandang') ? 'is-invalid' : '' }}" id="email" name="kandang" aria-describedby="emailHelp" placeholder="Kondisi Kandang." value="<?= old('kandang') ?>">
                        @if($errors->has('kandang'))<span class="small text-danger mt-2">{{ $errors->first('kandang') }}</span>@endif
                    </div>
                    <div class="form-group mb-0">
                        <button type="submit" class="btn btn-primary">Simpan</button>
                        <a href="{{ route('alternatif') }}" class="btn btn-light btn-light">Kembali</a>
                    </div>
                    {{ Form::close() }}
                </div>
            </div>
        </div>
    </div>
</section>

@include('components.theme.pages.footer')
