laravel 4: How insert raw HTML to label?

前端 未结 1 1583
南笙
南笙 2020-12-18 02:46

Is there some easy way how put raw HTML tag to label? I have this:

{{ Form::label(\'firstName\', \'First name *\', array(\'class\' =>         


        
相关标签:
1条回答
  • 2020-12-18 03:32

    Using sprintf in a macro is much faster than redecoding:

    Form::macro('rawLabel', function($name, $value = null, $options = array())
    {
        $label = Form::label($name, '%s', $options);
    
        return sprintf($label, $value);
    });
    
    0 讨论(0)
提交回复
热议问题