簡體   English   中英

使用Laravel + Blade添加一個下拉框

[英]Add a dropdown box using Laravel + Blade

如何在當前的刀片服務器代碼上添加一個下拉框?

這是我目前擁有的:

{!! Form::input('text', 'example', old("example", $user->example), array('class' => 'form-control')) !!}

嘗試這個:

echo Form::select('size', array('L' => 'Large', 'S' => 'Small'), 'S', array('id' => 'your_id', 'class' => 'your_class'));

哪里:

size :下拉菜單名稱,

array :生成下拉列表的數組,

S :默認選擇值,

之后,您可以在數組中傳遞idclassstyle ,例如:

array('id' => 'your_id', 'class' => 'your_class')

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM