maksuco /
此包已被废弃,不再维护。没有建议的替代包。
使用Laravel表单与Bootstrap 4组件
v1.0.5
2017-09-28 16:42 UTC
Requires
- php: >=5.6.0
- illuminate/support: ^5.0
This package is not auto-updated.
Last update: 2020-05-29 19:50:38 UTC
README
此包帮助您在blade中渲染bootstrap 4组件。
安装
您可以通过composer安装此包
$ composer require maksuco/b4c OR $ composer require maksuco/b4c:dev-master
此包与Laravel +5.5的自动发现功能兼容,但也可与旧版本兼容
使用
渲染文本输入
{!! \B4C::text($name,$label,$value,$attributes,$extra,$version) !!} //formtext('video','Video',$property->video,['placeholder' => 'Video code'],'required','form-group-default')
渲染文本区域输入
{!! \B4C::textarea($name,$label,$value,$attributes,$version) !!} //formtextarea('video','Video',$property->video,['css' => 'color-primary'],'')
渲染文件输入
{!! \B4C::file($name,$label,$attributes,$extra,$version) !!} //formfile('floorplan',__('Floor Plan'),['class' => 'mt-5','accept' => '.jpg,.jpeg,.png,.pdf'],'required','')
渲染选择输入
{!! \B4C::select($name,$label,$value,$options,$first,$attributes,$extra,$version) !!} //formselect('zone',__('zone'),$property->zone,['N','E','W','S','NE','NW','SE','SW'],'Choose one',['class' => 'h-20'],'','')
渲染复选框输入
{!! \B4C::check($name,$label,$value,$extra,'disabled') !!} //formswitch('show',__('Show'),1)
渲染开关输入
{!! \B4C::switch($name,$label,$value,$extra,'') !!} //formswitch('show',__('Show'),$item->show)
渲染单选按钮输入
{!! \B4C::radio($name,$label,$value,$extra,'') !!}
渲染文本/开关输入
{!! \B4C::textswitch($name,$label,$value,$attributes,$switch_name,$switch_value) !!} //formtext('video','Video',$property->video,['placeholder' => 'Video code'],'video_on',$property->video_on)
安全
如果您发现任何安全相关问题,请报告。
致谢
许可
MIT许可(MIT)。请参阅许可文件获取更多信息。