kshitizmittal
7 months ago

Laravel select dropdown Dropdown

Posted 7 months ago by kshitizmittal
$arrattendances=array( 'Regular' => 3,'Occasional'=>2,'Irregular' =>0, 'On Notice'=>0,'Inactive'=>0 )

I have this array and want want to pass in such a way that array value comes in option value and array key comes in option content.

Using this :-

{!! Form::select('attendance',[null=>'Select Attendance']+$arrattendances,null,["class"=>"form-control attendance","id"=>"attendance[]"]) !!}

Please sign in or create an account to participate in this conversation.