conditionally render widget stat?
How can I show hide stat using a condition? I want to show the first stat only when $this->productCount > 0.
5 Replies
i can use
extraAttributes()
and add class => 'hidden'
. But how can i add that using a condition ?you can do something like that :
Thanks will try this
Work ?
I created a brand new widget. Did not tried this one. creating new widget was easy. anyway thank you ❤️ @hugomyb