I'm working on displaying currency list from table in dropdown in laravel blade. In the dropdown option i want to set first value currency as set in csv file. but dropdown records are from table.
how do i set first value in dropdown as set in uploaded csv file.
Thanks for your help.
following are my code.
my.blade.php
storing currency from csv in variable = $array['currency']
<td class="currency"style="width: 10%;">
{{ Form::select('currency',$currencies , "",['class'=>"form-control select-currency",'data-plugin'=>"select2",
]) }}
</td>
MyModel.php
$currencies = Currency::all()->pluck('code', 'id');
$questions_table = \View::make('confirmation.form_questionnaire',
['questions' => $record['questions'], 'response_type' =>$record['response_type'], 'currencies' => $currencies]);