// CONTROLLER
$selectedShareEntities = ShareHolder::where('client_id', $clientId)->get()->pluck('entity_id');
return view('shares.shareholders.show', [
'selectedShareEntities' => $selectedShareEntities
]);
// BLADE
<div class="">
<label class="required-field">Share Entity</label>
{!! Form::select('entity_id[]', $shareEntities, $selectedShareEntities, ['id' => 'shareEntities', 'multiple' => 'multiple']) !!}
</div>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter