{{-- Write out the custom fields, and label if they're required --}} @foreach($pirep_fields as $field) @endforeach
Airline
{!! Form::select('airline_id', $airlines, null, ['class' => 'custom-select select2']) !!}

{{ $errors->first('airline_id') }}

Flight Number/Code/Leg
{!! Form::text('flight_number', null, ['placeholder' => 'Flight Number', 'class' => 'form-control']) !!} {!! Form::text('route_code', null, ['placeholder' => 'Code (optional)', 'class' => 'form-control']) !!} {!! Form::text('route_leg', null, ['placeholder' => 'Leg (optional)', 'class' => 'form-control']) !!}

{{ $errors->first('flight_number') }}

{{ $errors->first('route_code') }}

{{ $errors->first('route_leg') }}

Aircraft
{!! Form::select('aircraft_id', $aircraft, null, ['class' => 'custom-select select2']) !!}

{{ $errors->first('aircraft_id') }}

Origin Airport
{!! Form::select('dpt_airport_id', $airports, null, ['class' => 'custom-select select2']) !!}

{{ $errors->first('dpt_airport_id') }}

Arrival Airport
{!! Form::select('arr_airport_id', $airports, null, ['class' => 'custom-select select2']) !!}

{{ $errors->first('arr_airport_id') }}

Flight Time
{!! Form::number('hours', null, ['class' => 'form-control', 'placeholder' => 'hours']) !!} {!! Form::number('minutes', null, ['class' => 'form-control', 'placeholder' => 'minutes']) !!}

{{ $errors->first('hours') }}

{{ $errors->first('minutes') }}

{!! $field->name !!} @if($field->required === true) * @endif
{!! Form::text($field->slug, null, [ 'class' => 'form-control' ]) !!}

{{ $errors->first($field->slug) }}

Route
{!! Form::textarea('route', null, ['class' => 'form-control', 'placeholder' => 'Route']) !!}

{{ $errors->first('route') }}

Notes

{!! Form::textarea('notes', null, ['class' => 'form-control', 'placeholder' => 'Notes']) !!}

{{ $errors->first('notes') }}

{!! Form::submit('Submit PIREP', ['class' => 'btn btn-primary']) !!}