In my controller I have an array of options ($options=['a','b','c']) which I am using it in my view in a select input field. I need the values 'a','b','c' to be saved in the database instead of their corresponding keys (0,1,2).
How can I do this?
Controller:
public function create()
{
$options=['a','b','c'];
return view('example.create', compact('options'));
}
View:
<div class="form-group col-lg-4">
{!! Form::select('option', $options ,null , ['class' => 'form-control']) !!}
</div>