In my controller I am passing a multiple array to the view. The arrays that I am passing look like this:
$charts['names'] = ['Artikler lest', 'Antall kommentarer', 'Antall "bli med"', 'Tid på døgnet'];
$charts['values'] = ['Article', 'Comment', 'Thumb', 'View'];
return view('admin.charts.show',
compact(
'charts',
)
);
}
And in my view I have a select box that looks like this:
<div class="large-4 columns end">
{!! Form::select('velg', $charts['names'], null, ['id' => 'timelines']) !!}
</div>
With this I am passing just text to the select box, I would also like to pass a values so that they are connnected like this:
<option value="Article">Artikler lest</option>
<option value="Comment">Antall kommentarer</option>
<option value="Thumb">Antall "bli med"</option>
<option value="View">Tid på døgnet</option>
How would I do such thing with Laravel collective?