Reputation: 491
I have a table in a blade template and at the end of each row I have a button that deletes that row. In order to do this, I
{!! Form::submit('Delete', ['class' => 'btn btn-danger btn-xs']) !!}
Now I want to replace the 'Delete' with an icon. How can i achieve something like
{!! Form::submit(<i class="fa fa-minus-circle" aria-hidden="true"></i>
, ['class' => 'btn btn-danger btn-xs']) !!}
Cheers
Edit1: this is my complete code:
@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
Upvotes: 0
Views: 1413
Reputation: 345
Use a <button>
of the type submit instead
{!! Form::button('<i class="fa fa-minus-circle" aria-hidden="true"></i>', array('type' => 'submit', 'class' => '')) !!}
Upvotes: 1