|
@ -45,7 +45,10 @@ class BrewerieController extends Controller |
|
|
|
|
|
|
|
|
public function edit($id){ |
|
|
public function edit($id){ |
|
|
$brewery = Brewerie::where('id', (int)$id)->first(); |
|
|
$brewery = Brewerie::where('id', (int)$id)->first(); |
|
|
return view('breweries.edit')->with('brewery', $brewery); |
|
|
|
|
|
|
|
|
$breweries = Brewerie::orderBy('name')->get(); |
|
|
|
|
|
$selected_brewery = $brewery->name; |
|
|
|
|
|
$data = array('brewery'=>$brewery, 'breweries'=>$breweries, 'selected_brewery'=>$selected_brewery); |
|
|
|
|
|
return view('breweries.edit')->with($data); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function update(Request $request, $id) |
|
|
public function update(Request $request, $id) |
|
|