| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 | 
							- @extends("base")
 
- @section("content")
 
-     @if ($obj->id)
 
-         <form action="/airport/edit/{{$obj->id}}" method="post">
 
-     @else
 
-         <form action="/airport/create/" method="post">
 
-     @endif
 
-                     <div class="form-group">
 
-                         <label for="name">Имя аэропорта</label>
 
-                         <input type="text" class="form-control" value="{{$obj->name}}" name="name" id="name"
 
-                                placeholder="Введите имя">
 
-                         <label for="city">Город</label>
 
-                         <input type="text" class="form-control" value="{{$obj->city}}" name="city" id="city"
 
-                                placeholder="Введите город">
 
-                         <label for="planes">Самолеты</label>
 
-                         <select multiple class="form-control" name="planes[]" id="planes">
 
-                             @foreach($planes as $plane)
 
-                                 <option value="{{$plane->id}}"
 
-                                 @if ($plane->id == $obj->id)
 
-                                     selected
 
-                                 @endif
 
-                                 >{{$plane}}</option>
 
-                             @endforeach
 
-                         </select>
 
-                     </div>
 
-                     <div>
 
-                         @if (count($errors) > 0)
 
-                             <div class="alert alert-danger">
 
-                                 <ul>
 
-                                     @foreach ($errors->all() as $error)
 
-                                         <li>{{ $error }}</li>
 
-                                     @endforeach
 
-                                 </ul>
 
-                             </div>
 
-                         @endif
 
-                     </div>
 
-                     <button type="submit" class="btn btn-primary">Submit</button>
 
-                     @csrf
 
-                 </form>
 
- @stop
 
 
  |