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.
43 lines
1.6 KiB
43 lines
1.6 KiB
@extends('breweries')
|
|
@section('main') <div class="row">
|
|
<div class="col-sm-12">
|
|
<h1 class="display-3">Update Brewery</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('breweries.update', $brewery->id) }}">
|
|
@method('PATCH')
|
|
@csrf
|
|
<div class="form-group">
|
|
|
|
<label for="name">Name</label>
|
|
<select class="form-control" name="brewery_id">
|
|
@foreach ($breweries as $brewer)
|
|
<option value="{{$brewer->id}}" {{ $selected_brewery == $brewer->id ? 'selected="selected"' : '' }}>{{$brewer->name}}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="place">City/Region</label>
|
|
<input type="text" class="form-control" name="place" value={{ $brewery->place }} />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="country">Country</label>
|
|
<input type="text" class="form-control" name="country" value={{ $brewery->country }} />
|
|
<input type="hidden" name="breweryid" id="breweryid" value={{ $brewery->id }} />
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Update</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
@endsection
|