Advertisement
Ostap34JS

Untitled

Apr 8th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.29 KB | None | 0 0
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>Places in tours</title>
  6.     <link rel="stylesheet" href="{{ asset('css/app.css') }}">
  7. </head>
  8. <body>
  9. <div class="container">
  10.     <div class="row">
  11.         <div class="col-sm-10 offset-sm-1 ">
  12.             <form method="post" action="{{ route('update') }}">
  13.                 <div class="form-group">
  14.                     <label for="tour_id">Tour id:</label>
  15.                     <input type="number" name="tour_id" id="tour_id" class="form-control" value="1" required>
  16.                 </div>
  17.                 @csrf
  18.                 @foreach($places as $place)
  19.                     <div class="custom-control custom-checkbox">
  20.                         <input class="custom-control-input" type="checkbox" name="PlacesInTours[]"
  21.                               id="place_{{ $place->name }}" value="{{ $place->id }}"
  22.                         {{ in_array($place->id, $placesInTours) ? 'checked': '' }}>
  23.                         <label class="custom-control-label" for="place_{{ $place->name }}">{{ $place->name }}</label>
  24.                     </div>
  25.                 @endforeach
  26.                 <button type="submit" class="btn btn-primary">Update</button>
  27.             </form>
  28.         </div>
  29.     </div>
  30. </div>
  31. </body>
  32. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement