如何将CSS类应用于laravel集体选择 [英] how to apply css class to laravel collective select
本文介绍了如何将CSS类应用于laravel集体选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在项目中使用了laravel 5.3,我在下面的代码中使用了laravel窗体集合
i used laravel 5.3 for my project, i used laravel form collective into it code is below
{{形式:: select('size',['surat'=>'surat','mumbai'=>'mumbai','hongkong'=>'hongkong'],'hongkong',['multiple'=>'true'],array('class'=>'form-control'))}}
但是如果我删除了 ['multiple'=>'true']
array('class'=>'form-control')对我不起作用>代码>,然后它可以正常工作,因此如何将引导程序类应用于我的选择框.
but the array('class'=> 'form-control')
is not working for me if i removed ['multiple'=>'true']
then it work properly so how can i apply bootstrap class to my select box.
推荐答案
正确的语法:
{!! Form::select('size', $citiesArray, 'hongkong', ['multiple' => 'true', 'class' => 'form-control']) !!}
您应该在数组中将 id
, class
和其他属性作为第四个参数传递.
You should pass id
, class
and other attributes in an array as 4th parameter.
这篇关于如何将CSS类应用于laravel集体选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文