In an Laravelcollective submit button how to add icon

0 votes

I'm trying to add a trash icon to submit button and I tried this :

{!! Form::submit('', ['class' => 'btn btn-warning btn-sm fa fa-trash']) !!}

but the icon won't show. How to solve this ?

Dec 4, 2020 in Laravel by kartik
• 37,520 points
2,086 views

1 answer to this question.

0 votes

Hello @kartik,

Try to use Form::button instead of Form::submit:

{{ Form::button('<i class="fa fa-trash"></i>', ['type' => 'submit', 'class' => 'btn btn-warning btn-sm'] )  }}

Hope it helps!!

Thank you!!

answered Dec 4, 2020 by Niroj
• 82,840 points

Related Questions In Laravel

0 votes
1 answer

How to validate an input field if value is not null in Laravel?

Hello @kartik, try using nullable as a rule 'password' ...READ MORE

answered Sep 25, 2020 in Laravel by Niroj
• 82,840 points
15,947 views
0 votes
1 answer

How to include csrf_token() in an external js file in Laravel?

Hello @kartik, add <meta> tag with the token to the ...READ MORE

answered Oct 21, 2020 in Laravel by Niroj
• 82,840 points
1,575 views
0 votes
1 answer

How to invalidate all tokens for an user in laravel passport?

Hello @kartik, One of the methods it provides ...READ MORE

answered Oct 23, 2020 in Laravel by Niroj
• 82,840 points
4,879 views
0 votes
1 answer

How to add new value in collection laravel?

Hello @kartik, If you have a collection you ...READ MORE

answered Dec 4, 2020 in Laravel by Niroj
• 82,840 points
2,159 views
+1 vote
1 answer

How to make anchor tag with routing using Laravel?

Hey @kartik, First you have to go to ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,840 points
23,012 views
0 votes
1 answer

What is redirection in Laravel?

Named route is used to give specific ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,840 points
2,995 views
0 votes
1 answer

How to install Laravel via composer?

Hello, This is simple you just need to ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,840 points
2,918 views
+1 vote
1 answer

What are named routes in Laravel and How can specify route names for controller actions?

Hey @kartik, Named routing is another amazing feature of ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,840 points
44,691 views
0 votes
1 answer

How can I create a migration to add a value to an enum in eloquent?

Hello @kartik, Try using this code: public function up() ...READ MORE

answered Nov 12, 2020 in Laravel by Niroj
• 82,840 points
2,532 views
+2 votes
2 answers

How to add a new column to existing table of laravel in a migration?

You need do little modification in your ...READ MORE

answered Dec 10, 2020 in Laravel by anonymous
• 82,840 points
123,880 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP