我正在尝试让一个Bootstrap模型在其中包含多个列,但是它似乎没有使用我的内容垂直显示而不是列.我的代码在这里:
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Modal</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="row-md-6">
Left
</div>
<div class="row-md-6">
Right
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我发现周围的几件事情,解决了这一问题引导2,但它们不与引导3.工作,我也试着改变row-md-6
到sm
,xs
等,但没有运气.是否可以在Bootstrap 3中执行此操作?列对我来说是最理想的事情,但我应该一起避免列吗?
我正在创建一个围绕食物过敏的数据库,我在食物和过敏之间有很多关系.还有一个名为的枢轴值severity
,其具有表示该食品过敏严重程度的数字.
这个链接表看起来像这样;
food_id|allergy_id|severity
-------|----------|--------
1 | 1 | 3
1 | 4 | 1
2 | 2 | 1
Run Code Online (Sandbox Code Playgroud)
尝试使用Eloquent更新链接表时(其中$allergy_ids
是数组)
$food->allergies()->attach($allergy_ids);
Run Code Online (Sandbox Code Playgroud)
如何将此多个值与枢轴值一起添加到此数据透视表?
我可以allergy_id
使用上面的行一次性添加特定食品的所有食品,但是我如何severity
同时使用各种严重性值的数组添加列?也许是这样的
$food->allergies()->attach($allergy_ids, $severity_ids);
Run Code Online (Sandbox Code Playgroud)
编辑:对于特定食品,可能有0-20个过敏,如果这有帮助,每个过敏的严重等级为0-4.