|
@ -36,14 +36,14 @@ class SummarieController extends Controller |
|
|
'og' => 'required', |
|
|
'og' => 'required', |
|
|
'source' => 'required', |
|
|
'source' => 'required', |
|
|
'batch' => 'required', |
|
|
'batch' => 'required', |
|
|
|
|
|
'beer_id' => 'required', |
|
|
'brewery_id' => 'required' |
|
|
'brewery_id' => 'required' |
|
|
]); |
|
|
]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// create project
|
|
|
// create project
|
|
|
$beer = new Summarie; |
|
|
$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->name = $request->input('name'); |
|
|
$beer->type = $request->input('type'); |
|
|
$beer->type = $request->input('type'); |
|
|
$beer->abv = $request->input('abv'); |
|
|
$beer->abv = $request->input('abv'); |
|
@ -116,7 +116,10 @@ class SummarieController extends Controller |
|
|
} |
|
|
} |
|
|
public function create() |
|
|
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) |
|
|
public function destroy($id) |
|
|
{ |
|
|
{ |
|
|