usrNotFound
usrNotFound

Reputation: 2830

Laravel From::button

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)

Upvotes: 0

Views: 161

Answers (1)

Sh1d0w
Sh1d0w

Reputation: 9520

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')) }}

Upvotes: 1

Related Questions