@extends('adminlte::layouts.app')

@section('htmlheader_title')
    Create
@endsection

@section('contentheader_title')
    Page Create List Barang
@endsection

@section('main-content')
    <div class="container">
        <div class="col-md-8 col-md-offset-2">
            <div class="panel-body">
                <form class="form-horizontal" action="{{ url('store') }}" method="POST">
                            {!! csrf_field() !!}
                            <div class="form-group{{ $errors->has('nama') ? ' has-error' : '' }}">
                                <label for="title" class="col-md-4 control-label">Nama</label>
                                <div class="col-md-6">
                                    <input type="text" class="form-control" name="nama" value="{{ old('nama') }}" >
                                    @if ($errors->has('nama'))
                                        <span class="help-block">
                                            <strong>{{ $errors->first('nama') }}</strong>
                                        </span>
                                    @endif
                                </div>
                            </div>

                            <div class="form-group{{ $errors->has('jumlah') ? ' has-error' : '' }}">
                                <label for="title" class="col-md-4 control-label">Jumlah</label>
                                <div class="col-md-6">
                                    <input type="text" class="form-control" name="jumlah" value="{{ old('jumlah') }}" >
                                    @if ($errors->has('jumlah'))
                                        <span class="help-block">
                                            <strong>{{ $errors->first('jumlah') }}</strong>
                                        </span>
                                    @endif
                                </div>
                            </div>

                            <div class="form-group{{ $errors->has('harga') ? ' has-error' : '' }}">
                                <label for="title" class="col-md-4 control-label">Harga</label>
                                <div class="col-md-6">
                                    <input type="text" class="form-control" name="harga" value="{{ old('harga') }}" >
                                    @if ($errors->has('harga'))
                                        <span class="help-block">
                                            <strong>{{ $errors->first('harga') }}</strong>
                                        </span>
                                    @endif
                                </div>
                            </div>

                            <div class="form-group{{ $errors->has('deskripsi') ? ' has-error' : '' }}">
                                <label for="title" class="col-md-4 control-label">Deskripsi</label>
                                <div class="col-md-6">
                                    <input type="text" class="form-control" name="deskripsi" value="{{ old('deskripsi') }}" >
                                    @if ($errors->has('deskripsi'))
                                        <span class="help-block">
                                            <strong>{{ $errors->first('deskripsi') }}</strong>
                                        </span>
                                    @endif
                                </div>
                            </div>


                            <div class="form-group{{ $errors->has('kategori') ? ' has-error' : '' }}">
                                <label for="title" class="col-md-4 control-label">Kategori</label>
                                <div class="col-md-6">
                                        <select name="kategori" class="form-control">
                                            <option value="makanan">Makanan</option>
                                            <option value="minuman">Minuman</option>
                                            <option value="alat tulis">Alat Tulis</option>
                                            <option value="alat mandi">Alat Mandi</option>
                                        </select>
    
                                    @if ($errors->has('kategori'))
                                        <span class="help-block">
                                            <strong>{{ $errors->first('kategori') }}</strong>
                                        </span>
                                    @endif
                                </div>
                            </div>

                            <div class="form-group{{ $errors->has('gambar') ? ' has-error' : '' }}">
                                <label for="title" class="col-md-4 control-label">Gambar</label>
                                <div class="col-md-6">
                                    <input type="text" class="form-control" name="gambar" value="{{ old('gambar') }}" >
                                    @if ($errors->has('gambar'))
                                        <span class="help-block">
                                            <strong>{{ $errors->first('gambar') }}</strong>
                                        </span>
                                    @endif
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-md-6 col-md-offset-4">
                                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                    <button type="submit" class="btn btn-primary">
                                        Tambah
                                    </button>
                                </div>
                            </div>
                        </form>
            </div>
        </div>
    </div>
@endsection