Browse Source

trying to add dropdowns to edit blades - breweries mkII

master
jk 3 years ago
parent
commit
a8061a6cdc
  1. 2
      app/Http/Controllers/BrewerieController.php

2
app/Http/Controllers/BrewerieController.php

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

Loading…
Cancel
Save