Laravel From::button

167 Views Asked by At

How can I populate dynamic value for {{Form::button() }}?

This is what I have got:

{{ Form::button('Button Text', array('class' => 'btn btn-block btn-success','type'=>'submit')) }}

HTML Output is:

 <button class="btn btn-block btn-success" type="submit">Button Text </button>

How can I display $user as a button text? (.i.e $user is a dynamic value here)

1

There are 1 best solutions below

0
On

The first parameter is the text value. You just need to pass the dynamic value as first parameter, like this:

{{ Form::button($username, array('class' => 'btn btn-block btn-success','type'=>'submit')) }}