hi, I am using illuminate/html and laravel5 i have a form for a profiles page, and have want to use a $table->enum field for the data.
here is what the code looks like for the select.
<div class="form-group">
{!! Form::label('gendertest','Gender',['class' => 'control-label']) !!}
{!! Form::select('gendertest',['unknown','Male','Female'],null, ['class' => 'form-control
input-sm','placeholder' =>
'What is your gendertest?']) !!}
</div>
how can i bind the value from the database using the enum as in the database if i select option 1 which is male, male is set in the database, so when i retrieve male from the database i cant then select that, how can i do this?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community