Add icon to Laravelcollective submit button

后端 未结 3 906
滥情空心
滥情空心 2020-12-31 03:20

I\'m trying to add a trash icon to submit button and I tried this :

{!! Form::submit(\'\', [\'class\' => \'btn btn-warning btn-sm fa fa-trash\']) !!}


        
相关标签:
3条回答
  • 2020-12-31 03:45

    there are not possible try it laravel collective form given very competition

    <button class='btn btn-primary' type='submit' value='submit'>
    <i class='fa fa-save'> </i> Save
    

    0 讨论(0)
  • 2020-12-31 03:47

    You can try too with:

    Example to input type button:

    {{ FORM::button('<i class="glyphicon glyphicon-trash" aria-hidden="true"></i> Text button',['class'=>'button button-red','type'=>'button','id'=>'id-button']) }}
    
    0 讨论(0)
  • 2020-12-31 04:00

    Try to use Form::button instead of Form::submit:

    {{ Form::button('<i class="fa fa-trash"></i>', ['type' => 'submit', 'class' => 'btn btn-warning btn-sm'] )  }}
    
    0 讨论(0)
提交回复
热议问题