Hi I'm using Laravel version 5.6 with Materialize and need to show the user when he got messages. So I wanna use Badges of Materialize in my Navbar on my base page, which is extended by every single page I got. But how can I do this on my code?
Do I need to make every single function that I got return the variable to be check in my html file? Is there an easy way to do this?
The only thing I can think to do this is to put the code of verification in my base page, but I looks realy ugly and wrong. Any way the code in the home page looks something like this:
@if( <> "0" ) <li><a href="">Chat <span class="new badge red"> </span></a></li> @else <li><a href="">Chat</a></li> @endif So is this right?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire