diff --git a/app/Http/Controllers/FermentationController.php b/app/Http/Controllers/FermentationController.php index ba21082..da486cd 100644 --- a/app/Http/Controllers/FermentationController.php +++ b/app/Http/Controllers/FermentationController.php @@ -55,7 +55,13 @@ class FermentationController extends Controller } public function edit($id){ $fermentation = Fermentation::where('id', (int)$id)->first(); - return view('fermentations.edit')->with('fermentation', $fermentation); + $beers = Summarie::orderBy('name')->get(); + $selected_beer = $fermentation->beer_id; + $yeasts = Yeast::orderBy('name')->get(); + $selected_yeast = $fermentation->yeast_id; + $selected_alt = $fermenation->alternative; + $data = array('fermentation'=>$fermentation, 'beers'=>$beers, 'yeasts'=>$yeasts, 'selected_beer'=>$selected_beer, 'selected_yeast'=>$selected_yeast, 'selected_alt'=>$selected_alt); + return view('fermentations.edit')->with($data); } public function update(Request $request, $id){ diff --git a/resources/views/adjunctadditions/create.blade.php b/resources/views/adjunctadditions/create.blade.php index b353a6c..da009f2 100644 --- a/resources/views/adjunctadditions/create.blade.php +++ b/resources/views/adjunctadditions/create.blade.php @@ -2,7 +2,7 @@ @section('main')