createDataRequest.blade.php 3.61 KB
@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('storeDataRequest') }}" method="POST">
                            {!! csrf_field() !!}
                            <div class="form-group{{ $errors->has('nama_barang') ? ' has-error' : '' }}">
                                <label for="title" class="col-md-4 control-label">Nama Barang</label>
                                <div class="col-md-6">
                                    <input type="text" class="form-control" name="nama_barang" value="{{ old('nama_barang') }}" >
                                    @if ($errors->has('nama_barang'))
                                        <span class="help-block">
                                            <strong>{{ $errors->first('nama_barang') }}</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('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">
                                <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