How to create a submit button in Laravel

Submit button sends the form data to the URL specified by action attribute. To create a submit button use the following code. First parameter is the value of submit button.

Quick Tip : Create a radio button field in Laravel

{{ Form::submit('Send') }}

This will generate following HTML output.

<input type="submit" value="Send">

Second argument can be passed to the method to specify additional HTML attributes.

{{ Form::submit('Send', array('class' => 'btn btn-primary')) }}

This will produce,

<input class="btn btn-primary" type="submit" value="Send">


Leave a Comment.