Browse Source

hops refactor mkV

master
jk 3 years ago
parent
commit
48c087dc57
  1. 2
      app/Http/Controllers/GrainController.php
  2. 4
      resources/views/hops/edit.blade.php
  3. 2
      resources/views/hops/index.blade.php

2
app/Http/Controllers/GrainController.php

@ -60,7 +60,7 @@ class GrainController extends Controller
}
$grain->save();
return redirect('/grains')->with('success', 'Grain Added');
return redirect('/grains')->with('success', 'Grain Added!');
}
public function edit($id){

4
resources/views/hops/edit.blade.php

@ -22,11 +22,11 @@
</div>
<div class="form-group">
<label for="bitter">Bittering?</label>
<input type="checkbox" class="form-control" name="bitter" value="{{$hop->bitter}}" />
<input type="checkbox" class="form-control" name="bitter" @if($hop->bitter == 1) checked @endif />
</div>
<div class="form-group">
<label for="aroma">Aroma?</label>
<input type="checkbox" class="form-control" name="aroma" value="{{$hop->aroma}}" />
<input type="checkbox" class="form-control" name="aroma" @if($hop->aroma == 1) checked @endif />
</div>
<div class="form-group">
<label for="profile">Profile</label>

2
resources/views/hops/index.blade.php

@ -22,8 +22,8 @@
<th scope="col">Profile</th>
<th scope="col">Bittering?</th>
<th scope="col">Aroma?</th>
</tr>
@if (Auth::user()->isAdmin())<th colspan="2" scope="col">Admin</th>@endif
</tr>
</thead>
<tbody>

Loading…
Cancel
Save