Laravel setup bootstrap to select -
this simple select form , can not set bootstrap form-control
.
{{ form::select('size', array('l' => 'large', 's' => 'small'),array('class'=>'form-control','style'=>'' )) }}
you missing 1 argument select statement. structure should be:
public function select($name, $list = array(), $selected = null, $options = array())
so in case, should change to:
{{ form::select('size', array('l' => 'large', 's' => 'small'), null, array('class'=>'form-control','style'=>'' )) }}
you can, instead of giving null third parameter, put 'l' or 's' make 1 of options default choice.
you can find more information form elements via laravel api:
Comments
Post a Comment