Htmlable label - illegal offset type
Hello, everyone.
I'm having a little problem with label(). My goal would be to replace the label text with a small image (a google logo).
The problem is that when I try to use a new HtmlString as the label value, it returns an error like ‘Illegal offset type’ no matter what I enter.
As soon as I enter a normal string instead, everything is fine.
I also found this example online:
but I can't figure out what the problem is. Is it possible that it does work only on Forms?
Thank you all very much for your support
I'm having a little problem with label(). My goal would be to replace the label text with a small image (a google logo).
The problem is that when I try to use a new HtmlString as the label value, it returns an error like ‘Illegal offset type’ no matter what I enter.
As soon as I enter a normal string instead, everything is fine.
I also found this example online:
but I can't figure out what the problem is. Is it possible that it does work only on Forms?
Thank you all very much for your support
Solution
@Dennis Koch I solved the problem:
in
and then:
For now it's working
thanks for your input!
in
AppServiceProvider I created this function:and then:
For now it's working