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.

40 lines
1.3 KiB

3 years ago
  1. @extends('base')
  2. @section('main')
  3. <div class="row">
  4. <div class="col-sm-8 offset-sm-2">
  5. <h1 class="display-3">Update a contact</h1>
  6. @if ($errors->any())
  7. <div class="alert alert-danger">
  8. <ul>
  9. @foreach ($errors->all() as $error)
  10. <li>{{ $error }}</li>
  11. @endforeach
  12. </ul>
  13. </div>
  14. <br />
  15. @endif
  16. <form method="post" action="{{ route('breweries.update', $brewery->id) }}">
  17. @method('PATCH')
  18. @csrf
  19. <div class="form-group">
  20. <label for="name">Name</label>
  21. <input type="text" class="form-control" name="name" value={{ $brewery->name }} />
  22. </div>
  23. <div class="form-group">
  24. <label for="place">City/Region</label>
  25. <input type="text" class="form-control" name="place" value={{ $brewery->place }} />
  26. </div>
  27. <div class="form-group">
  28. <label for="country">Country</label>
  29. <input type="text" class="form-control" name="country" value={{ $brewery->country }} />
  30. <input type="hidden" name="breweryid" id="breweryid" value={{ $brewery->id }} />
  31. </div>
  32. <button type="submit" class="btn btn-primary">Update</button>
  33. </form>
  34. </div>
  35. </div>
  36. @endsection