@ -75,7 +75,8 @@ class MasheController extends Controller
}
public function create()
{
return view('mashes.create');
$beers = Summarie::orderBy('name')->get();
return view('mashes.create')->with('beers', $beers);
public function destroy($id)
@ -20,7 +20,7 @@
<label for="beer_id">Beer ID</label>
<select>
@foreach ($beers as $beer)
<option name="beer_id" value="{{$beer->beer_id}}">"{{$beer->name}} (ID: {{$beer->beer_id}})"</option>
<option name="beer_id" value="{{$beer->beer_id}}">{{$beer->name}}</option>
@endforeach
</select>
</div>
@ -18,7 +18,11 @@
@csrf
<div class="form-group">
<input type="text" class="form-control" name="beer_id">
<label for="temperature">Temperature</label>