From 75a1b7d4ca4f302843b28a11d6e39b54739b2b78 Mon Sep 17 00:00:00 2001 From: jk Date: Wed, 23 Jun 2021 12:11:30 +0100 Subject: [PATCH] reverting edit drop downs for breweries --- app/Http/Controllers/BrewerieController.php | 5 +---- resources/views/breweries/edit.blade.php | 10 +++------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/app/Http/Controllers/BrewerieController.php b/app/Http/Controllers/BrewerieController.php index 56cb0fc..736f48c 100644 --- a/app/Http/Controllers/BrewerieController.php +++ b/app/Http/Controllers/BrewerieController.php @@ -45,10 +45,7 @@ class BrewerieController extends Controller public function edit($id){ $brewery = Brewerie::where('id', (int)$id)->first(); - $breweries = Brewerie::orderBy('name')->get(); - $selected_brewery = $brewery->id; - $data = array('brewery'=>$brewery, 'breweries'=>$breweries, 'selected_brewery'=>$selected_brewery); - return view('breweries.edit')->with($data); + return view('breweries.edit')->with('brewery', $brewery); } public function update(Request $request, $id) diff --git a/resources/views/breweries/edit.blade.php b/resources/views/breweries/edit.blade.php index befdfbb..a9b466d 100644 --- a/resources/views/breweries/edit.blade.php +++ b/resources/views/breweries/edit.blade.php @@ -19,21 +19,17 @@
- +
- place }} /> +
- country }} /> + id }} />