Creating a Button Element


You want to create a button element in your Blade template.


Use the Form::button() method.

Specify the value as the first argument.

{{ Form::button('Hit Me') }}

The HTML produced is very simple.

<button type="button">Hit Me</button>

Use the second argument to add additional attributes.

{{ Form::button('Hit Me', array('class' => 'btn')) }}

And now resulting the button has a class.

<button class="btn" type="button">Hit Me</button>


Nothing to discuss.

comments powered by Disqus