kaushal
1 week ago

Larvel 6 generates dropdown with "optgroup" auomatically. How to remove "optgroup" in following method

Posted 1 week ago by kaushal

{{Form::select('user[country_id]',$arr_country_id_list,$selected_country_id,['id'=>'country_id','class'=>'form-control' ]}}

I am passing following array in $arr_country_id_list from controller Array ( [0] => Array ( [country_id] => 1 [country_name] => india )

[1] => Array
    (
        [country_id] => 2
        [country_name] => pakistan

    )

[2] => Array
    (
        [country_id] => 3
        [country_name] => australia
    )

[3] => Array
    (
        [country_id] => 4
        [country_name] => america
    )

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