9

I have this problem, I can't find the way to add class attribute in this Dropdown box

{{Form::select('bancada', Bancada::lists('nombre','idBancada'))}}

I have tried various syntax, but can not get it to work.

Any suggestions? Thanks

Iván F
  • 91
  • 1
  • 1
  • 4

2 Answers2

22

Use the forth parameter to add attributes to your element.

{{Form::select('bancada', Bancada::lists('nombre','idBancada'), null, ['class' => 'my_class'])}}

Take a look at the source ($options is the same as attributes for your element).

Marwelln
  • 28,492
  • 21
  • 93
  • 117
9
{{ Form::select('status', $statusList, null, array('class' => 'form-control')) }}

In above example you can add class as fourth parameter

Nikunj K.
  • 8,779
  • 4
  • 43
  • 53