Browse Source

beers refactor mkIII

master
jk 3 years ago
parent
commit
f55beab8cc
  1. 4
      app/Http/Controllers/SummarieController.php

4
app/Http/Controllers/SummarieController.php

@ -71,7 +71,7 @@ class SummarieController extends Controller
}
public function edit($id){
$beer = Summarie::where('id', (int)$id)->first();
$beer = Summarie::where('beer_id', (int)$id)->first();
return view('beers.edit')->with('beer', $beer);
}
@ -90,7 +90,7 @@ class SummarieController extends Controller
'brewery_id' => 'required'
]);
$beer = Summarie::where('id', $id)->first();
$beer = Summarie::where('beer_id', $id)->first();
$beer->name = $request->input('name');
$beer->type = $request->input('type');
$beer->abv = $request->input('abv');

Loading…
Cancel
Save