|
@ -49,6 +49,11 @@ class HopAdditionController extends Controller |
|
|
} |
|
|
} |
|
|
public function edit($id){ |
|
|
public function edit($id){ |
|
|
$hopaddition = Hopaddition::where('id', (int)$id)->first(); |
|
|
$hopaddition = Hopaddition::where('id', (int)$id)->first(); |
|
|
|
|
|
$beers = Summarie::orderBy('name')->get(); |
|
|
|
|
|
$selected_beer = $hopaddition->beer_id; |
|
|
|
|
|
$hops = Hop::orderBy('name')->get(); |
|
|
|
|
|
$selected_hop = $hopaddition->hop_id; |
|
|
|
|
|
$data = array('hopaddition'=>$hopaddition, 'beers'=>$beers, 'hops'=>$hops, 'selected_beer'=>$selected_beer, 'selected_hop'=>$selected_hop); |
|
|
return view('hopadditions.edit')->with('hopaddition', $hopaddition); |
|
|
return view('hopadditions.edit')->with('hopaddition', $hopaddition); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|