My beer compendium
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.
 
 
 
 
 
 

88 lines
4.1 KiB

@extends('beers')
@section('main') <div class="row">
<div class="col-sm-12">
<h1 class="display-3">Update Beer</h1>
@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('beers.update', $beer->beer_id) }}">
@method('PATCH')
@csrf
<div class="form-group">
<label for="name">Name</label>
<input type="hidden" class="form-control" name="name" value="{{ $beer->beer_id }}" />
<input type="text" class="form-control" name="name" value="{{ $beer->name }}" />
</div>
<div class="form-group">
<label for="keywords">Keywords</label>
<textarea type="text" class="form-control" name="keywords"/>{{str_replace(' ,',',',str_replace('"',' ',str_replace(',',', ',str_replace('}', '', str_replace('{','',$beer->keywords)))))}}</textarea>
</div>
<div class="Type">
<label for="type">Style</label>
<input type="text" class="form-control" name="type" value="{{ $beer->type }}" />
</div>
<div class="form-group">
<label for="abv">ABV %</label>
<input type="text" maxlength="5" class="form-control" name="abv" value="{{ $beer->abv }}" />
</div>
<div class="form-group">
<label for="og">Original Gravity (OG)</label>
<input type="text" maxlength="8" class="form-control" name="og" value="{{ $beer->og }}" />
</div>
<div class="form-group">
<label for="fg">Final Gravity (FG)</label>
<input type="text" maxlength="8" class="form-control" name="fg" value="{{ $beer->fg }}" />
</div>
<div class="form-group">
<label for="source">Source</label>
<input type="text" class="form-control" name="source" value="{{ $beer->source }}" />
</div>
<div class="form-group">
<label for="notes">Notes</label>
<textarea type="text" class="form-control" name="notes" />{{ $beer->notes }}</textarea>
</div>
<div class="form-group">
<label for="brewery_id">Brewery</label>
<select class="form-control" name="brewery_id">
@foreach ($breweries as $brewery)
<option value="{{$brewery->id}}" {{ $selected_brewery == $brewery->id ? 'selected="selected"' : '' }}>{{$brewery->name}}</option>
@endforeach
</select>
</div>
<div class="form-group">
<label for="batch">Batch Size (L)</label>
<input type="text" class="form-control" name="batch" value="{{ $beer->batch }}" />
</div>
<div class="form-group">
<label for="boil_volume">Boil Volume (L)</label>
<input type="text" class="form-control" name="boil_volume" value="{{ $beer->boil_volume }}" />
</div>
<div class="form-group">
<label for="ebc">EBC</label>
<input type="text" class="form-control" name="ebc" value="{{ $beer->ebc }}" />
</div>
<div class="form-group">
<label for="srm">SRM</label>
<input type="text" class="form-control" name="srm" value="{{ $beer->srm }}" />
</div>
<div class="form-group">
<label for="ph">pH</label>
<input type="text" class="form-control" name="ph" value="{{ $beer->ph }}" />
</div>
<div class="form-group">
<label for="mine">Mine?</label>
<input type="checkbox" class="form-control" name="mine" value={{ $beer->mine }} />
</div>
<button type="submit" class="btn btn-primary">Update</button>
</form>
</div>
</div>
@endsection