How to make this code into blade of laravel
<label class="radio" for="penyakit-0">
<input name="penyakit" id="penyakit-0" value="Asma" type="radio">
Asma
</label>
i've tried many ways to the radio button can be clicked from its text by using blade syntax, but still don't get anything right..
This is my blade syntax for that HTML:
<label class="radio" for="penyakit-0">
{{ Form::radio('penyakit', 'Asma', array('id'=>'penyakit-0')) }}
</label>
Try:
{{ Form::label('penyakit-0', 'Asma') }}
{{ Form::radio('penyakit', 'Asma', false, array('id'=>'penyakit-0')) }}
As Phil Gyford pointed out above, this Laravel blade snippet doesn't yield a label
element with an embedded input
element.
Unfortunately (or fortunately) by design design Laravel blade opted for the alternate construction using for
attribute for some reason.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With