My beer compendium
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
3.1 KiB

  1. @extends('beers')
  2. @section('main') <div class="row">
  3. <div class="col-sm-8 offset-sm-2">
  4. <h1 class="display-3">Update Beer</h1>
  5. @if ($errors->any())
  6. <div class="alert alert-danger">
  7. <ul>
  8. @foreach ($errors->all() as $error)
  9. <li>{{ $error }}</li>
  10. @endforeach
  11. </ul>
  12. </div>
  13. <br />
  14. @endif
  15. <form method="post" action="{{ route('beers.update', $beer->beer_id) }}">
  16. @method('PATCH')
  17. @csrf
  18. <div class="form-group">
  19. <label for="name">Name</label>
  20. <input type="hidden" class="form-control" name="name" value="{{ $beer->beer_id }}" />
  21. <input type="text" class="form-control" name="name" value="{{ $beer->name }}" />
  22. </div>
  23. <div class="form-group">
  24. <label for="keywords">Keywords</label>
  25. <textarea type="text" class="form-control" name="keywords"/>{{str_replace(' ,',',',str_replace('"',' ',str_replace(',',', ',str_replace('}', '', str_replace('{','',$beer->keywords)))))}}</textarea>
  26. </div>
  27. <div class="Type">
  28. <label for="type">Style</label>
  29. <input type="text" class="form-control" name="type" value="{{ $beer->type }}" />
  30. </div>
  31. <div class="form-group">
  32. <label for="abv">ABV %</label>
  33. <input type="text" class="form-control" name="abv" value="{{ $beer->abv }}" />
  34. </div>
  35. <div class="form-group">
  36. <label for="og">Original Gravity (OG)</label>
  37. <input type="text" class="form-control" name="og" value="{{ $beer->og }}" />
  38. </div>
  39. <div class="form-group">
  40. <label for="fg">Final Gravity (FG)</label>
  41. <input type="text" class="form-control" name="fg" value="{{ $beer->fg }}" />
  42. </div>
  43. <div class="form-group">
  44. <label for="source">Source</label>
  45. <input type="text" class="form-control" name="source" value="{{ $beer->source }}" />
  46. </div>
  47. <div class="form-group">
  48. <label for="notes">Notes</label>
  49. <textarea type="text" class="form-control" name="notes" />{{ $beer->notes }}</textarea>
  50. </div>
  51. <div class="form-group">
  52. <label for="brewery_id">Brewery ID</label>
  53. <input type="text" class="form-control" name="brewery_id" value="{{ $beer->brewery_id }}" />
  54. </div>
  55. <div class="form-group">
  56. <label for="batch">Batch Size (L)</label>
  57. <input type="text" class="form-control" name="batch" value="{{ $beer->batch }}" />
  58. </div>
  59. <div class="form-group">
  60. <label for="mine">Mine?</label>
  61. <input type="checkbox" class="form-control" name="mine" value={{ $beer->mine }} />
  62. </div>
  63. <button type="submit" class="btn btn-primary">Update</button>
  64. </form>
  65. </div>
  66. </div>
  67. @endsection