我想将HTML按钮转换为Laravel表单按钮。我不知道怎么做。
<button type="submit" class="btn btn-block btn-primary">
<i class="fa fa-plus"></i> Benutzer hinzufügen
</button>
在我的刀片模板中,它现在如下所示:
{!! Form::submit('Benutzer hinzufügen', array('class' => 'btn btn-block btn-primary')) !!}
有这样的选择吗?
{!! Form::submit('Benutzer hinzufügen', array('class' => 'btn btn-block btn-primary', 'child' => '<i class="fa fa-plus"></i>')) !!}
你可以
这样做:
{!! Form::button('<i class="fa fa-plus"></i> Benutzer hinzufügen', array('class' => 'btn btn-block btn-primary', 'type' => 'submit')) !!}
它将为您想要的而工作!