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.

67 lines
3.0 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="text" class="form-control" name="name" value="{{ $beer->name }}" />
  21. </div>
  22. <div class="form-group">
  23. <label for="keywords">Keywords</label>
  24. <textarea type="text" class="form-control" name="keywords"/>{{str_replace(' ,',',',str_replace('"',' ',str_replace(',',', ',str_replace('}', '', str_replace('{','',$beer->keywords)))))}}</textarea>
  25. </div>
  26. <div class="Type">
  27. <label for="type">Style</label>
  28. <input type="text" class="form-control" name="type" value="{{ $beer->type }}" />
  29. </div>
  30. <div class="form-group">
  31. <label for="abv">ABV %</label>
  32. <input type="text" class="form-control" name="abv" value="{{ $beer->abv }}" />
  33. </div>
  34. <div class="form-group">
  35. <label for="og">Original Gravity (OG)</label>
  36. <input type="text" class="form-control" name="og" value="{{ $beer->og }}" />
  37. </div>
  38. <div class="form-group">
  39. <label for="fg">Final Gravity (FG)</label>
  40. <input type="text" class="form-control" name="fg" value="{{ $beer->fg }}" />
  41. </div>
  42. <div class="form-group">
  43. <label for="source">Source</label>
  44. <input type="text" class="form-control" name="source" value="{{ $beer->source }}" />
  45. </div>
  46. <div class="form-group">
  47. <label for="notes">Notes</label>
  48. <textarea type="text" class="form-control" name="notes" />{{ $beer->notes }}</textarea>
  49. </div>
  50. <div class="form-group">
  51. <label for="brewery_id">Brewery ID</label>
  52. <input type="text" class="form-control" name="brewery_id" value="{{ $beer->brewery_id }}" />
  53. </div>
  54. <div class="form-group">
  55. <label for="batch">Batch Size (L)</label>
  56. <input type="text" class="form-control" name="batch" value="{{ $beer->batch }}" />
  57. </div>
  58. <div class="form-group">
  59. <label for="mine">Mine?</label>
  60. <input type="checkbox" class="form-control" name="mine" value={{ $beer->mine }} />
  61. </div>
  62. <button type="submit" class="btn btn-primary">Update</button>
  63. </form>
  64. </div>
  65. </div>
  66. @endsection