我有以下表格,可用作“删除”按钮。
{{ Form::open(['method' => 'DELETE', 'route' => ['notes.delete', $note->user->id]]) }}
{{ Form::submit('Delete', ['class' => 'btn btn-warning btn-sm']) }}
{{ Form::close() }}
有没有办法用 Font Awesome 图标替换“删除”按钮文本?我尝试将其更改为:
{{ Form::submit('<i class="fa fa-minus-circle" aria-hidden="true"></i>', ['class' => 'btn btn-warning btn-sm']) }}
但是,它不显示图标,而只是 HTML 代码的原始版本 - <i class="fa fa-minus-circle" aria-hidden="true"></i>
. 有没有办法在 Laravel 表单中使用 Font Awesome?