fightstarr20
fightstarr20

Reputation: 12568

Laravel set ID of radio button

I am using Larabel 5.5 and i am trying to set the ID of a radio button. According to the docs I should be able to do...

{{ Form::radio('sex', 'male', array('id'=>'male','label'=>'female')) }}

But this is not returning an ID

Where am I going wrong?

Upvotes: 2

Views: 889

Answers (1)

Sohel0415
Sohel0415

Reputation: 9853

You need to add a third parameter boolean whether it is checked or not and fourth one is the array.

{{ Form::radio('sex', 'male', false, array('id'=>'male','label'=>'female')) }}

Upvotes: 4

Related Questions