Name | Value | @endif @php # # A little nasty having logic like this in a template, but we need # to filter out the field values that have already been shown, since # they were values set because they had a FlightField parent # $shown = []; @endphp @foreach($flight_fields->concat($flight->field_values) as $field) @php if(in_array($field->name, $shown, true)) { continue; } $shown[] = $field->name; $val_field = $flight->field_values->where('name', $field->name)->first(); @endphp |
---|---|---|
{{ $field->name }} | {{ $val_field['value'] ?? '' }} |
{{ Form::open(['url' => '/admin/flights/'.$flight->id.'/fields',
'method' => 'delete',
'class' => 'pjax_form pjax_flight_fields'
]) }}
{{ Form::hidden('field_id', $val_field['id'] ?? null) }}
{{ Form::button('',
['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon',
'onclick' => "return confirm('Are you sure?')"]) }}
{{ Form::close() }}
|
{{ $errors->first('name') }}
{{ $errors->first('value') }}
{{ Form::close() }}