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
238 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,760 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,760 points
4,537 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 20, 2020 in Laravel by Niroj
• 82,760 points
270 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,760 points
882 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,760 points
125 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,760 points
7,876 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,760 points
892 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,760 points
712 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,760 points
8,364 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,760 points
872 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,760 points
34,449 views