0

How to add css to Laravel Collective Form::select elemet in the following format

Form::select('size', ['L' => 'Large', 'S' => 'Small'], null, ['placeholder' => 'Pick a size...']);
harinsamaranayake
  • 751
  • 2
  • 12
  • 32

1 Answers1

1

You can class as fourth parameter like ['class' => 'your_define_class']

Form::select('size', ['L' => 'Large', 'S' => 'Small'], null, ['placeholder' => 'Pick a size...'],['class' => 'your_define_class']);


Try this

albus_severus
  • 3,626
  • 1
  • 13
  • 25
  • Did this method work for u? I just found one which is working here https://stackoverflow.com/questions/41358271/how-to-apply-css-class-to-laravel-collective-select that is to use it within the 4th parameter. – harinsamaranayake Apr 13 '20 at 16:21