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.

39 lines
1.3 KiB

3 years ago
  1. @extends('breweries')
  2. @section('main') <div class="row">
  3. <div class="col-sm-8 offset-sm-2">
  4. <h1 class="display-3">Update Brewery</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('breweries.update', $brewery->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={{ $brewery->name }} />
  21. </div>
  22. <div class="form-group">
  23. <label for="place">City/Region</label>
  24. <input type="text" class="form-control" name="place" value={{ $brewery->place }} />
  25. </div>
  26. <div class="form-group">
  27. <label for="country">Country</label>
  28. <input type="text" class="form-control" name="country" value={{ $brewery->country }} />
  29. <input type="hidden" name="breweryid" id="breweryid" value={{ $brewery->id }} />
  30. </div>
  31. <button type="submit" class="btn btn-primary">Update</button>
  32. </form>
  33. </div>
  34. </div>
  35. @endsection