Hi, is there a possibility to put an HTML Attribute depending on whether or not a condition is true? Let say I would like to make the checked and disabled attributes conditional, how do I do that?
<input type="radio" checked disabled name="obj->name" value="{{$obj->id}}">{{$obj->title}}
Maybe
<input type="radio" {{ $somethingtocheck ? 'checked disabled' : '' }} ....>
try this
<input type="radio" {{ ( $something == 'condition' ) ? 'checked' : 'disabled' }} ... >
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community