You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.6 KiB
48 lines
1.6 KiB
@extends('grainbills')
|
|
|
|
@section('main')
|
|
<div class="row">
|
|
<div class="col-sm-12 offset-sm-2">
|
|
<h1 class="display-3">Add a Grain</h1>
|
|
<div>
|
|
@if ($errors->any())
|
|
<div class="alert alert-danger">
|
|
<ul>
|
|
@foreach ($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div><br />
|
|
@endif
|
|
<form method="post" action="{{ route('grainbills.store') }}">
|
|
@csrf
|
|
<div class="form-group">
|
|
<label for="beer_id">Beer</label>
|
|
<select>
|
|
@foreach ($beers as $beer)
|
|
<option name="beer_id" value="{{$beer->beer_id}}">{{$beer->name}}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="grain_id">Grain</label>
|
|
<select>
|
|
@foreach ($grains as $grain)
|
|
<option name="grain_id" value="{{$grain->id}}">{{$grain->name}}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="amount">Amount</label>
|
|
<input type="text" maxlength="7" class="form-control" name="amount">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="grain_bill">% of Total Grain Bill</label>
|
|
<input type="text" maxlength="4"class="form-control" name="grain_bill">
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Add Grain</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|