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.
 
 
 
 
 
 

55 lines
2.4 KiB

@extends('grains')
@section('main') <div class="row">
<div class="col-sm-12 offset-sm-2">
<h1 class="display-3">Update Grain</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('grains.update', $grain->id) }}">
@method('PATCH')
@csrf
<div class="form-group">
<label for="name">Name</label>
<input type="text" class="form-control" name="name" value="{{$grain->name}}"/>
</div>
<div class="form-group">
<label for="flavour">Flavour</label>
<textarea type="text" class="form-control" name="flavour" />{{$grain->flavour}}</textarea>
</div>
<div class="form-group">
<label for="colour">Colour</label>
<input type="text" class="form-control" name="colour" value="{{$grain->colour}}"/>
</div>
<div class="form-group">
<label for="lintner">Lintner</label>
<input type="text" class="form-control" name="lintner" value="{{$grain->lintner}}"/>
</div>
<div class="form-group">
<label for="winkol">Windisch-Kolbach</label>
<input type="text" class="form-control" name="winkol" value="{{$grain->winkol}}"/>
</div>
<div class="form-group">
<label for="lovibond">Lovibond</label>
<input type="text" class="form-control" name="lovibond" value="{{$grain->lovibond}}"/>
</div>
<div class="form-group">
<label for="ebc">EBC</label>
<input type="text" class="form-control" name="ebc" value="{{$grain->ebc}}"/>
</div>
<div class="form-group">
<label for="alternative">Alternative(s)</label>
<input type="text" class="form-control" name="alternative" value="{{str_replace(' ,',',',str_replace('"',' ',str_replace(',',', ',str_replace('}', '', str_replace('{','',$grain->alternative)))))}}"/>
</div>
<button type="submit" class="btn btn-primary">Update</button>
</form>
</div>
</div>
@endsection