Aisha Rafique
Aisha Rafique

Reputation: 53

How can I add inline css in laravel blade syntax button?

I want to add style attribute like the normal HTML button element

<button type="button" style="background-color: #b4b7b7">Load</button>

in this button

{{ Form::submit('Load', ['class'=>'btn btn-primary']) }}

Upvotes: 2

Views: 7833

Answers (1)

UfguFugullu
UfguFugullu

Reputation: 2147

This code in Laravels blade with LaravelCollective's HTML

{{ Form::button('Load', ['type' => 'button', 'style' => 'background-color: #b4b7b7']) }}

should produce the following html

<button type="button" style="background-color: #b4b7b7">Load</button>

Upvotes: 5

Related Questions