diff --git a/app/Http/Controllers/FermentationController.php b/app/Http/Controllers/FermentationController.php index 722db05..ba21082 100644 --- a/app/Http/Controllers/FermentationController.php +++ b/app/Http/Controllers/FermentationController.php @@ -82,7 +82,10 @@ class FermentationController extends Controller } public function create() { - return view('fermentations.create'); + $beers = Summarie::orderBy('name')->get(); + $yeasts = Yeast::orderBy('name')->get(); + $data = array('beers'=>$beers, 'yeasts'=>$yeasts); + return view('fermentations.create')->with($data); } public function destroy($id) { diff --git a/resources/views/fermentations/create.blade.php b/resources/views/fermentations/create.blade.php index 8e3a906..5741e99 100644 --- a/resources/views/fermentations/create.blade.php +++ b/resources/views/fermentations/create.blade.php @@ -17,12 +17,20 @@
@csrf
- - + +
- - + +
diff --git a/resources/views/grainbills/create.blade.php b/resources/views/grainbills/create.blade.php index 0efff05..900195a 100644 --- a/resources/views/grainbills/create.blade.php +++ b/resources/views/grainbills/create.blade.php @@ -17,7 +17,7 @@ @csrf
- +
- + @foreach ($beers as $beer) @@ -25,7 +25,7 @@
- + @foreach ($beers as $beer)