Browse Source

adding IBU to beer data

master
jk 3 years ago
parent
commit
86d0de48d2
  1. 8
      app/Http/Controllers/SummarieController.php
  2. 2
      resources/views/beer.blade.php
  3. 4
      resources/views/beers/create.blade.php
  4. 4
      resources/views/beers/edit.blade.php

8
app/Http/Controllers/SummarieController.php

@ -68,6 +68,10 @@ class SummarieController extends Controller
{
$beer->boil_volume = $request->input('boil_volume');
}
if ($request->input('ibu'))
{
$beer->ibu = $request->input('ibu');
}
if ($request->input('ebc'))
{
$beer->ebc = $request->input('ebc');
@ -131,6 +135,10 @@ class SummarieController extends Controller
{
$beer->boil_volume = $request->input('boil_volume');
}
if ($request->input('ibu'))
{
$beer->ibu = $request->input('ibu');
}
if ($request->input('ebc'))
{
$beer->ebc = $request->input('ebc');

2
resources/views/beer.blade.php

@ -17,6 +17,7 @@
<th scope="col">ABV %</th>
<th scope="col">OG</th>
<th scope="col">FG</th>
@if($beer->ibu)<th scope="col">IBU</th>@endif
@if($beer->ebc)<th scope="col">EBC</th>@endif
@if($beer->srm)<th scope="col">SRM</th>@endif
@if($beer->ph)<th scope="col">pH</th>@endif
@ -29,6 +30,7 @@
<td>{{$beer->abv}} </td>
<td>{{$beer->og}} </td>
<td>{{$beer->fg}} </td>
@if($beer->ibu)<td>{{$beer->ibu}} </td>@endif
@if($beer->ebc)<td>{{$beer->ebc}} </td>@endif
@if($beer->srm)<td>{{$beer->srm}} </td>@endif
@if($beer->ph)<td>{{$beer->ph}} </td>@endif

4
resources/views/beers/create.blade.php

@ -69,6 +69,10 @@
<input type="text" class="form-control" name="boil_volume">
</div>
<div class="form-group">
<label for="ibu">IBU</label>
<input type="text" class="form-control" name="ibu">
</div>
<div class="form-group">
<label for="ebc">EBC</label>
<input type="text" class="form-control" name="ebc">
</div>

4
resources/views/beers/edit.blade.php

@ -66,6 +66,10 @@
<input type="text" class="form-control" name="boil_volume" value="{{ $beer->boil_volume }}" />
</div>
<div class="form-group">
<label for="ibu">IBU</label>
<input type="text" class="form-control" name="ibu" value="{{ $beer->ibu }}" />
</div>
<div class="form-group">
<label for="ebc">EBC</label>
<input type="text" class="form-control" name="ebc" value="{{ $beer->ebc }}" />
</div>

Loading…
Cancel
Save