laravel-仅在特定条件下选择单选按钮

laravel-仅在特定条件下选择单选按钮,laravel,if-statement,radio-button,enable-if,Laravel,If Statement,Radio Button,Enable If,我需要根据情况禁用一个单选按钮。这是我的尝试,但不起作用。如何才能做到这一点 <input type="radio" id="type100" name="type" enabled="{{ ((auth()->user()->type100) > 10) }}" value="100" checked> 试试这些 <input type="radio" id="type100" name="type" {{ auth()->user()-&g

我需要根据情况禁用一个单选按钮。这是我的尝试,但不起作用。如何才能做到这一点

 <input type="radio" id="type100" name="type" enabled="{{ ((auth()->user()->type100) > 10)  }}" value="100" checked> 

试试这些

<input type="radio" id="type100" name="type" {{ auth()->user()->type100 > 10 ? '' : 'disabled' }} value="100" checked>
user()->type100>10?''已禁用'}}value=“100”选中>

谢谢!它起作用了!也可以将两个条件连接起来吗?比如说>10和<100?@sharkyenergy是的,您可以使用
&&
来实现这一点。