|
|
@ -36,14 +36,14 @@ class SummarieController extends Controller |
|
|
|
'og' => 'required', |
|
|
|
'source' => 'required', |
|
|
|
'batch' => 'required', |
|
|
|
'beer_id' => 'required', |
|
|
|
'brewery_id' => 'required' |
|
|
|
]); |
|
|
|
|
|
|
|
|
|
|
|
// create project
|
|
|
|
$beer = new Summarie; |
|
|
|
$lastID = Summarie::orderBy('beer_id','desc')->value('beer_id'); |
|
|
|
$beer->beer_id = number_format($lastID) + 1; |
|
|
|
$beer->beer_id = $request->input('beer_id') |
|
|
|
$beer->name = $request->input('name'); |
|
|
|
$beer->type = $request->input('type'); |
|
|
|
$beer->abv = $request->input('abv'); |
|
|
@ -116,7 +116,10 @@ class SummarieController extends Controller |
|
|
|
} |
|
|
|
public function create() |
|
|
|
{ |
|
|
|
return view('beers.create'); |
|
|
|
$lastID = Summarie::orderBy('beer_id','desc')->value('beer_id'); |
|
|
|
$beer_id = number_format($lastID) + 1; |
|
|
|
return view('beers.create')->with('beer_id', $beer_id); |
|
|
|
|
|
|
|
} |
|
|
|
public function destroy($id) |
|
|
|
{ |
|
|
|