Save the following code to app/macros.php (this file doesn’t exist by default so create it):
HTML::macro( 'submit', function( $value = null, $options = array() ) { $options = array_merge( $options, array( 'class' => 'btn btn-info' ) ); return Form::input( 'submit', null, $value, $options ); });
Now include macros.php by adding require app_path().’/macros.php’; to the bottom of app/start/global.php.
And now in your views, instead of:
Form::submit( 'Submit', array( 'class' => 'btn btn-info' ) );
Use:
HTML::submit( 'Submit' );