Support the ongoing development of Laravel.io →
Input Blade

How would I write the following for blade?

 <button type="submit" class="btn btn-warning">
 <span class="glyphicon glyphicon-search"></span>
 </button>

Thanks,

Chris Edwards

Last updated 3 years ago.
0

That HTML should just work, blade or not you shouldn't need anything else. Is it not working?

Last updated 3 years ago.
0

It works perfectly. The rest of the form is in blade and I was just curious of what this code would look like in blade if possible.

Last updated 3 years ago.
0

Hey i'm new the Laravel, i think you can do something like this,

{{ Form::button(
    '<span class="glyphicon glyphicon-search"></span>',
    array(
        'class'=>'btn btn-warning',
        'type'=>'submit')) 
}}
Last updated 3 years ago.
0

You need to make a custom HTML macro. Docs Custom Macros

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

offlinetn offlinetn Joined 4 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.