Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Places in tours</title>
- <link rel="stylesheet" href="{{ asset('css/app.css') }}">
- </head>
- <body>
- <div class="container">
- <div class="row">
- <div class="col-sm-10 offset-sm-1 ">
- <form method="post" action="{{ route('update') }}">
- <div class="form-group">
- <label for="tour_id">Tour id:</label>
- <input type="number" name="tour_id" id="tour_id" class="form-control" value="1" required>
- </div>
- @csrf
- @foreach($places as $place)
- <div class="custom-control custom-checkbox">
- <input class="custom-control-input" type="checkbox" name="PlacesInTours[]"
- id="place_{{ $place->name }}" value="{{ $place->id }}"
- {{ in_array($place->id, $placesInTours) ? 'checked': '' }}>
- <label class="custom-control-label" for="place_{{ $place->name }}">{{ $place->name }}</label>
- </div>
- @endforeach
- <button type="submit" class="btn btn-primary">Update</button>
- </form>
- </div>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement