Browse Source

beers refactor mkXV

master
jk 3 years ago
parent
commit
113025e402
  1. 2
      app/Http/Controllers/SummarieController.php
  2. 1
      resources/views/beers/edit.blade.php

2
app/Http/Controllers/SummarieController.php

@ -89,7 +89,7 @@ class SummarieController extends Controller
]); ]);
$beer = Summarie::where('beer_id', $id)->first(); $beer = Summarie::where('beer_id', $id)->first();
$beer->beer_id=$id;
$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');

1
resources/views/beers/edit.blade.php

@ -18,6 +18,7 @@
@csrf @csrf
<div class="form-group"> <div class="form-group">
<label for="name">Name</label> <label for="name">Name</label>
<input type="hidden" class="form-control" name="name" value="{{ $beer->beer_id }}" />
<input type="text" class="form-control" name="name" value="{{ $beer->name }}" /> <input type="text" class="form-control" name="name" value="{{ $beer->name }}" />
</div> </div>
<div class="form-group"> <div class="form-group">

Loading…
Cancel
Save