Using Laravel 4's Form class, we can create a list using
{{ @Form::select('colors', Colors::all()), $color }}
Question: How can we add the attribute disabled
using Blade without having to rewrite the clean Blade syntax into the usual ugly form?
Just add array('disabled')
in the end like:
{{ Form::select('colors', Colors::all(), $color, array('disabled')) }}
This should do the work.
{{ @Form::select('colors', Colors::all()), array(
'disabled' => 'disabled',
'class' => 'myclass'
) }}
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