jk
3 years ago
36 changed files with 215 additions and 350 deletions
-
50app/Http/Controllers/HopAdditionController.php
-
2app/Http/Controllers/MasheController.php
-
2resources/views/adjunct.blade.php
-
2resources/views/adjuncts/create.blade.php
-
2resources/views/adjuncts/edit.blade.php
-
2resources/views/adjuncts/index.blade.php
-
6resources/views/beer.blade.php
-
2resources/views/beers/create.blade.php
-
2resources/views/beers/edit.blade.php
-
2resources/views/beers/index.blade.php
-
2resources/views/breweries/create.blade.php
-
6resources/views/breweries/edit.blade.php
-
3resources/views/breweries/index.blade.php
-
4resources/views/brewery.blade.php
-
231resources/views/edit.blade.php
-
2resources/views/grain.blade.php
-
2resources/views/grainbill.blade.php
-
2resources/views/grainbills/create.blade.php
-
2resources/views/grainbills/edit.blade.php
-
2resources/views/grainbills/index.blade.php
-
2resources/views/grains/create.blade.php
-
2resources/views/grains/edit.blade.php
-
2resources/views/grains/index.blade.php
-
2resources/views/hop.blade.php
-
79resources/views/hopadditions.blade.php
-
40resources/views/hopadditions/create.blade.php
-
39resources/views/hopadditions/edit.blade.php
-
54resources/views/hopadditions/index.blade.php
-
2resources/views/hops/create.blade.php
-
2resources/views/hops/edit.blade.php
-
2resources/views/hops/index.blade.php
-
2resources/views/yeast.blade.php
-
2resources/views/yeasts/create.blade.php
-
2resources/views/yeasts/edit.blade.php
-
2resources/views/yeasts/index.blade.php
-
3routes/web.php
@ -1,231 +0,0 @@ |
|||
@extends('layouts.app') |
|||
|
|||
@section('content') |
|||
<div class="container"> |
|||
<div class="row justify-content-center"> |
|||
<div class="col-md-8"> |
|||
<div class="card"> |
|||
<div class="card-header"><a href="/home">Home</a> -> {{ __('Edit Page') }}<span class="backlink"><a href="{{url()->previous()}}">Go Back</a></span></div> |
|||
|
|||
<div class="card-body"> |
|||
<ul id="editbuttons"> |
|||
<li><button class="btn btn-primary btn-lg" data-toggle="gmodal" data-target="#gaddModal" type="button" name="gbutton" > |
|||
Add Grain Bill |
|||
</button></li> |
|||
<li><button class="btn btn-primary btn-lg" data-toggle="mmodal" data-target="#maddModal" type="button" name="mbutton" > |
|||
Add Mash Step |
|||
</button></li> |
|||
<li><button class="btn btn-primary btn-lg" data-toggle="hmodal" data-target="#haddModal" type="button" name="hbutton" > |
|||
Add Hop Addition |
|||
</button></li> |
|||
<li><button class="btn btn-primary btn-lg" data-toggle="amodal" data-target="#aaddModal" type="button" name="abutton" > |
|||
Add Adjunct Addition |
|||
</button></li> |
|||
<li><button class="btn btn-primary btn-lg" data-toggle="fmodal" data-target="#faddModal" type="button" name="fbutton" > |
|||
Add Fermentation Step |
|||
</button></li></ul> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- this code if for the modal --> |
|||
<div class="modal fade bg-primary text-dark" tabindex="-1" role="dialog" id="gaddModal"> |
|||
<div class="modal-dialog" role="document"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<h5 class="modal-title">Add Grain Bill</h5> |
|||
<button type="button" class="close" data-dismiss="gmodal" aria-label="Close" > |
|||
<span aria-hidden="true">x</span> |
|||
</button> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<form class="" action="{{route('gstore')}}" method="post"> |
|||
{{csrf_field()}} |
|||
<div class="form-group"> |
|||
<label for="">Beer ID</label> |
|||
<input type="text" class="form-control" name="beer_id"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Grain ID</label> |
|||
<input type="text" class="form-control" name="grain_id" > |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Amount</label> |
|||
<input type="text" class="form-control" name="amount"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">% of Total Grain Bill</label> |
|||
<input type="text" class="form-control" name="grain_bill"> |
|||
</div> |
|||
<input type="submit" name="submit" value="Submit" class="btn btn-success"> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- this code if for the modal --> |
|||
<div class="modal fade bg-primary text-dark" tabindex="-1" role="dialog" id="maddModal"> |
|||
<div class="modal-dialog" role="document"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<h5 class="modal-title">Add Grain</h5> |
|||
<button type="button" class="close" data-dismiss="mmodal" aria-label="Close" > |
|||
<span aria-hidden="true">x</span> |
|||
</button> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<form class="" action="{{route('mstore')}}" method="post"> |
|||
{{csrf_field()}} |
|||
<div class="form-group"> |
|||
<label for="">Beer ID</label> |
|||
<input type="text" class="form-control" name="beer_id"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Temperature</label> |
|||
<input type="text" class="form-control" name="temp" > |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Duration</label> |
|||
<input type="text" class="form-control" name="duration"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Stage</label> |
|||
<input type="text" class="form-control" name="stage"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Length of Boil</label> |
|||
<input type="text" class="form-control" name="boil"> |
|||
</div> |
|||
<input type="submit" name="submit" value="Submit" class="btn btn-success"> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- this code if for the modal --> |
|||
<div class="modal fade bg-primary text-dark" tabindex="-1" role="dialog" id="haddModal"> |
|||
<div class="modal-dialog" role="document"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<h5 class="modal-title">Add Hop Addition</h5> |
|||
<button type="button" class="close" data-dismiss="hmodal" aria-label="Close" > |
|||
<span aria-hidden="true">x</span> |
|||
</button> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<form class="" action="{{route('hstore')}}" method="post"> |
|||
{{csrf_field()}} |
|||
<div class="form-group"> |
|||
<label for="">Beer ID</label> |
|||
<input type="text" class="form-control" name="beer_id"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Hop ID</label> |
|||
<input type="text" class="form-control" name="hop_id" > |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Amount</label> |
|||
<input type="text" class="form-control" name="amount"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Timing</label> |
|||
<input type="text" class="form-control" name="timing"> |
|||
</div> |
|||
<input type="submit" name="submit" value="Submit" class="btn btn-success"> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- this code if for the modal --> |
|||
<div class="modal fade bg-primary text-dark" tabindex="-1" role="dialog" id="aaddModal"> |
|||
<div class="modal-dialog" role="document"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<h5 class="modal-title">Add Grain</h5> |
|||
<button type="button" class="close" data-dismiss="amodal" aria-label="Close" > |
|||
<span aria-hidden="true">x</span> |
|||
</button> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<form class="" action="{{route('astore')}}" method="post"> |
|||
{{csrf_field()}} |
|||
<div class="form-group"> |
|||
<label for="">Beer ID</label> |
|||
<input type="text" class="form-control" name="beer_id"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Adjunct ID</label> |
|||
<input type="text" class="form-control" name="adjunct_id" > |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Amount</label> |
|||
<input type="text" class="form-control" name="amount"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Timing</label> |
|||
<input type="text" class="form-control" name="timing"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Alternative (ID)</label> |
|||
<input type="text" class="form-control" name="alternative"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Notes</label> |
|||
<textarea type="text" class="form-control" name="notes"></textarea> |
|||
</div> |
|||
<input type="submit" name="submit" value="Submit" class="btn btn-success"> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- this code if for the modal --> |
|||
<div class="modal fade bg-primary text-dark" tabindex="-1" role="dialog" id="faddModal"> |
|||
<div class="modal-dialog" role="document"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<h5 class="modal-title">Add Fermentation</h5> |
|||
<button type="button" class="close" data-dismiss="fmodal" aria-label="Close" > |
|||
<span aria-hidden="true">x</span> |
|||
</button> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<form class="" action="{{route('fstore')}}" method="post"> |
|||
{{csrf_field()}} |
|||
<div class="form-group"> |
|||
<label for="">Beer ID</label> |
|||
<input type="text" class="form-control" name="beer_id"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Yeast ID</label> |
|||
<input type="text" class="form-control" name="yeast_id" > |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Temperature</label> |
|||
<input type="text" class="form-control" name="temperature"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Duration</label> |
|||
<textarea type="text" class="form-control" name="duration"></textarea> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Alternative (ID)</label> |
|||
<input type="text" class="form-control" name="alternative"> |
|||
</div> |
|||
<input type="submit" name="submit" value="Submit" class="btn btn-success"> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
@endsection |
@ -1,83 +1,8 @@ |
|||
@extends('layouts.app') |
|||
|
|||
@section('content') |
|||
<div class="container"> |
|||
<div class="row justify-content-center"> |
|||
<div class="col-md-8"> |
|||
<div class="card"> |
|||
@include('inc.navbar') |
|||
<div class="card-header"><a href="/home">Home</a> -> {{ __('Hop Additions') }}<span class="backlink"><a href="{{url()->previous()}}">Go Back</a></span></div> |
|||
|
|||
<div class="card-body"> |
|||
@if (Auth::user()->isAdmin()) |
|||
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#addModal" type="button" name="button" > |
|||
Add Hop Addition |
|||
</button> |
|||
<hr/> |
|||
@endif |
|||
<table class="table table-striped table-dark" id="table-programs"> |
|||
<!-- This piece of code is for error messages display purposes --> |
|||
@include('inc.messages') |
|||
<thead> |
|||
<tr> |
|||
<th scope="col">Beer ID</th> |
|||
<th scope="col">Hop ID</th> |
|||
<th scope="col">Amount</th> |
|||
<th scope="col">Timing</th> |
|||
</tr> |
|||
</thead> |
|||
|
|||
<tbody> |
|||
@foreach ($hopadditions as $hopaddition) |
|||
<tr> |
|||
<td>{{$hopaddition->beer_id}} </td> |
|||
<td>{{$hopaddition->hop_id}} </td> |
|||
<td>{{$hopaddition->amount}} </td> |
|||
<td>{{$hopaddition->timing}} </td> |
|||
</tr> |
|||
@endforeach |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- this code if for the modal --> |
|||
<div class="modal fade bg-primary text-dark" tabindex="-1" role="dialog" id="addModal"> |
|||
<div class="modal-dialog" role="document"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<h5 class="modal-title">Add Hop Addition</h5> |
|||
<button type="button" class="close" data-dismiss="modal" aria-label="Close" > |
|||
<span aria-hidden="true">x</span> |
|||
</button> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<form class="" action="{{route('hopadditions.store')}}" method="post"> |
|||
{{csrf_field()}} |
|||
<div class="form-group"> |
|||
<label for="">Beer ID</label> |
|||
<input type="text" class="form-control" name="beer_id"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Hop ID</label> |
|||
<input type="text" class="form-control" name="hop_id" > |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Amount</label> |
|||
<input type="text" class="form-control" name="amount"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="">Timing</label> |
|||
<input type="text" class="form-control" name="timing"> |
|||
</div> |
|||
<input type="submit" name="submit" value="Submit" class="btn btn-success"> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="container"> |
|||
@yield('main') |
|||
</div> |
|||
|
|||
@endsection |
@ -0,0 +1,40 @@ |
|||
@extends('hopadditions') |
|||
|
|||
@section('main') |
|||
<div class="row"> |
|||
<div class="col-sm-12 offset-sm-2"> |
|||
<h1 class="display-3">Add a Grain</h1> |
|||
<div> |
|||
@if ($errors->any()) |
|||
<div class="alert alert-danger"> |
|||
<ul> |
|||
@foreach ($errors->all() as $error) |
|||
<li>{{ $error }}</li> |
|||
@endforeach |
|||
</ul> |
|||
</div><br /> |
|||
@endif |
|||
<form method="post" action="{{ route('hopadditions.store') }}"> |
|||
@csrf |
|||
<div class="form-group"> |
|||
<label for="beer_id">Beer ID</label> |
|||
<input type="text" class="form-control" name="beer_id"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="hop_id">Hop ID</label> |
|||
<input type="text" class="form-control" name="hop_id" > |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="amount">Amount</label> |
|||
<input type="text" class="form-control" name="amount"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="timing">Timing</label> |
|||
<input type="text" class="form-control" name="timing"> |
|||
</div> |
|||
<button type="submit" class="btn btn-primary">Add Grain</button> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
@endsection |
@ -0,0 +1,39 @@ |
|||
@extends('hopadditions') |
|||
@section('main') <div class="row"> |
|||
<div class="col-sm-12 offset-sm-2"> |
|||
<h1 class="display-3">Update Hop Addition</h1> |
|||
|
|||
@if ($errors->any()) |
|||
<div class="alert alert-danger"> |
|||
<ul> |
|||
@foreach ($errors->all() as $error) |
|||
<li>{{ $error }}</li> |
|||
@endforeach |
|||
</ul> |
|||
</div> |
|||
<br /> |
|||
@endif |
|||
<form method="post" action="{{ route('hopadditions.update', $hopaddition->id) }}"> |
|||
@method('PATCH') |
|||
@csrf |
|||
<div class="form-group"> |
|||
<label for="beer_id">Beer ID</label> |
|||
<input type="text" class="form-control" name="beer_id" value="{{$hopaddition->beer_id}}" /> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="hop_id">Hop ID</label> |
|||
<input type="text" class="form-control" name="hop_id" value="{{$hopaddition->hop_id}}" /> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="amount">Amount</label> |
|||
<input type="text" class="form-control" name="amount" value="{{$hopaddition->amount}}" /> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="timing">Timing</label> |
|||
<input type="text" class="form-control" name="timing" value="{{$hopaddition->timing}}" /> |
|||
</div> |
|||
<button type="submit" class="btn btn-primary">Update</button> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
@endsection |
@ -0,0 +1,54 @@ |
|||
@extends('hopadditions') |
|||
|
|||
@section('main') |
|||
<div class="container"> |
|||
<div class="row justify-content-center"> |
|||
<div class="col-md-12"> |
|||
<div class="card"> |
|||
@include('inc.navbar') |
|||
<div class="card-header"><a href="/home">Home</a> -> {{ __('Hop Additions') }}<span class="backlink"><a href="{{url()->previous()}}">Go Back</a></span></div> |
|||
|
|||
<div class="card-body"> |
|||
@if (Auth::user()->isAdmin()) |
|||
<a href="{{ route('hopadditions.create') }}" class="btn btn-primary">Add Hop Addition</a> |
|||
<hr/> |
|||
@endif |
|||
<table class="table table-striped table-dark" id="table-programs"> |
|||
<!-- This piece of code is for error messages display purposes --> |
|||
@include('inc.messages') |
|||
<thead> |
|||
<tr> |
|||
<th scope="col">Beer</th> |
|||
<th scope="col">Hop</th> |
|||
<th scope="col">Amount</th> |
|||
<th scope="col">Timing</th> |
|||
@if (Auth::user()->isAdmin())<th colspan="2" scope="col">Admin</th>@endif |
|||
</tr> |
|||
</thead> |
|||
|
|||
<tbody> |
|||
@foreach ($hopadditions as $hopaddition) |
|||
<tr> |
|||
<td><a href="/beer/{{$hopaddition->beer_id}}">{{$hopaddition->beer}}</a> </td> |
|||
<td><a href="/hop/{{$hopaddition->hop_id}}">{{$hopaddition->hop}}</a> </td> |
|||
<td>{{$hopaddition->amount}} </td> |
|||
<td>{{$hopaddition->timing}} </td> |
|||
@if (Auth::user()->isAdmin()) |
|||
<td><a href="{{ route('hopadditions.edit',$hopaddition->id)}}" class="btn btn-primary">Edit</a></td> |
|||
<td><form action="{{ route('hopadditions.destroy', $hopaddition->id)}}" method="post"> |
|||
@csrf |
|||
@method('DELETE') |
|||
<button class="btn btn-danger" type="submit">Delete</button> |
|||
</form></td> |
|||
@endif |
|||
</tr> |
|||
@endforeach |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
@endsection |
Write
Preview
Loading…
Cancel
Save
Reference in new issue