@php // This file represents a common source and definition for assets used in attachment_select // While it is not per se as tidy as defining these in the controller(s), // doing so this way enables better compatibility across disparate extensions $items = \App\Models\Item\Item::orderBy('name')->pluck('name', 'id'); $newses = \App\Models\News::orderBy('title')->pluck('title', 'id'); $prompts = \App\Models\Prompt\Prompt::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', 'Prompt' => 'Prompt', 'News' => 'News', 'Figure' => 'Figure', 'Fauna' => 'Fauna', 'Flora' => 'Flora', 'Faction' => 'Faction', 'Concept' => 'Concept', 'Location' => 'Location', 'Event' => 'Event', ], null, ['class' => 'form-control attachment-type', 'placeholder' => 'Select Attachment Type'], ) !!}
{!! Form::text('attachment_data[]', null, ['class' => 'form-control']) !!}
{!! Form::select('attachment_id[]', $items, null, ['class' => 'form-control item-select', 'placeholder' => 'Select Item']) !!} {!! Form::select('attachment_id[]', $newses, null, ['class' => 'form-control news-select', 'placeholder' => 'Select News Post']) !!} {!! Form::select('attachment_id[]', $locations, null, ['class' => 'form-control location-select', 'placeholder' => 'Select Location']) !!} {!! Form::select('attachment_id[]', $figures, null, ['class' => 'form-control figure-select', 'placeholder' => 'Select Figure']) !!} {!! Form::select('attachment_id[]', $faunas, null, ['class' => 'form-control fauna-select', 'placeholder' => 'Select Fauna']) !!} {!! Form::select('attachment_id[]', $floras, null, ['class' => 'form-control flora-select', 'placeholder' => 'Select Flora']) !!} {!! Form::select('attachment_id[]', $factions, null, ['class' => 'form-control faction-select', 'placeholder' => 'Select Faction']) !!} {!! Form::select('attachment_id[]', $concepts, null, ['class' => 'form-control concept-select', 'placeholder' => 'Select Concept']) !!} {!! Form::select('attachment_id[]', $prompts, null, ['class' => 'form-control prompt-select', 'placeholder' => 'Select Prompt']) !!} {!! Form::select('attachment_id[]', $events, null, ['class' => 'form-control event-select', 'placeholder' => 'Select Event']) !!}