@php
$items = \App\Models\Item\Item::orderBy('name')->pluck('name', 'id');
$locations = \App\Models\WorldExpansion\Location::getLocationsByType();
$figures = \App\Models\WorldExpansion\Figure::getFiguresByCategory();
$faunas = \App\Models\WorldExpansion\Fauna::getFaunasByCategory();
$floras = \App\Models\WorldExpansion\Flora::getFlorasByCategory();
$concepts = \App\Models\WorldExpansion\Concept::getConceptsByCategory();
$factions = \App\Models\WorldExpansion\Faction::getFactionsByType();
$events = \App\Models\WorldExpansion\Event::getEventsByCategory();
@endphp
{!! Form::select(
'attachment_type[]',
[
'Item' => 'Item',
'Event' => 'Event',
'Figure' => 'Figure',
'Fauna' => 'Fauna',
'Flora' => 'Flora',
'Faction' => 'Faction',
'Concept' => 'Concept',
'Location' => 'Location',
],
$term->link_type,
['class' => 'form-control attachment-type', 'placeholder' => 'Select Attachment Type'],
) !!}
@if ($term->link_type == 'Item')
{!! Form::select('attachment_id[]', $items, $term->link_id, ['class' => 'form-control item-select', 'placeholder' => 'Select Item']) !!}
@elseif($term->link_type == 'Figure')
{!! Form::select('attachment_id[]', $figures, $term->link_id, ['class' => 'form-control figure-select', 'placeholder' => 'Select Figure']) !!}
@elseif($term->link_type == 'Fauna')
{!! Form::select('attachment_id[]', $faunas, $term->link_id, ['class' => 'form-control fauna-select', 'placeholder' => 'Select Fauna']) !!}
@elseif($term->link_type == 'Flora')
{!! Form::select('attachment_id[]', $floras, $term->link_id, ['class' => 'form-control flora-select', 'placeholder' => 'Select Flora']) !!}
@elseif($term->link_type == 'Faction')
{!! Form::select('attachment_id[]', $factions, $term->link_id, ['class' => 'form-control faction-select', 'placeholder' => 'Select Faction']) !!}
@elseif($term->link_type == 'Concept')
{!! Form::select('attachment_id[]', $concepts, $term->link_id, ['class' => 'form-control concept-select', 'placeholder' => 'Select Concept']) !!}
@elseif($term->link_type == 'Location')
{!! Form::select('attachment_id[]', $locations, $term->link_id, ['class' => 'form-control location-select', 'placeholder' => 'Select Location']) !!}
@elseif($term->link_type == 'Event')
{!! Form::select('attachment_id[]', $events, $term->link_id, ['class' => 'form-control event-select', 'placeholder' => 'Select Event']) !!}
@endif