From 86d0de48d278481c36521065c7726a5903a005c8 Mon Sep 17 00:00:00 2001 From: jk Date: Wed, 23 Jun 2021 16:20:05 +0100 Subject: [PATCH] adding IBU to beer data --- app/Http/Controllers/SummarieController.php | 8 ++++++++ resources/views/beer.blade.php | 2 ++ resources/views/beers/create.blade.php | 4 ++++ resources/views/beers/edit.blade.php | 4 ++++ 4 files changed, 18 insertions(+) diff --git a/app/Http/Controllers/SummarieController.php b/app/Http/Controllers/SummarieController.php index d75e210..f87a2c8 100644 --- a/app/Http/Controllers/SummarieController.php +++ b/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'); diff --git a/resources/views/beer.blade.php b/resources/views/beer.blade.php index e333165..68064bb 100644 --- a/resources/views/beer.blade.php +++ b/resources/views/beer.blade.php @@ -17,6 +17,7 @@ ABV % OG FG + @if($beer->ibu)IBU@endif @if($beer->ebc)EBC@endif @if($beer->srm)SRM@endif @if($beer->ph)pH@endif @@ -29,6 +30,7 @@ {{$beer->abv}} {{$beer->og}} {{$beer->fg}} + @if($beer->ibu){{$beer->ibu}} @endif @if($beer->ebc){{$beer->ebc}} @endif @if($beer->srm){{$beer->srm}} @endif @if($beer->ph){{$beer->ph}} @endif diff --git a/resources/views/beers/create.blade.php b/resources/views/beers/create.blade.php index 6e6a056..629fcec 100644 --- a/resources/views/beers/create.blade.php +++ b/resources/views/beers/create.blade.php @@ -69,6 +69,10 @@
+ + +
+
diff --git a/resources/views/beers/edit.blade.php b/resources/views/beers/edit.blade.php index 8a41807..07250e6 100644 --- a/resources/views/beers/edit.blade.php +++ b/resources/views/beers/edit.blade.php @@ -66,6 +66,10 @@
+ + +
+