我在刀片模板中有一个表,在每行的末尾我有一个删除该行的按钮。为了做到这一点,我
{!! Form::submit('Delete', ['class' => 'btn btn-danger btn-xs']) !!}
现在我想用图标替换'删除'。我怎样才能实现像
这样的东西{!! Form::submit(<i class="fa fa-minus-circle" aria-hidden="true"></i>
, ['class' => 'btn btn-danger btn-xs']) !!}
干杯
EDIT1: 这是我的完整代码:
@foreach($student->language as $language)
{{ $language->name }}
{!! Form::open([
'method'=>'DELETE',
'url' => ['profile/language', $language->id],
'style' => 'display:inline'
]) !!}
{!! Form::button('<i class="fa fa-times" aria-hidden="true"></i>', ['class' => 'btn btn-danger btn-xs']) !!}
{!! Form::close() !!}
@endforeach
答案 0 :(得分:1)
使用提交类型的<button>
{!! Form::button('<i class="fa fa-minus-circle" aria-hidden="true"></i>', array('type' => 'submit', 'class' => '')) !!}