lundi 2 octobre 2017

Laravel Blade Using custom function

I have a blade where I'm printing the content of a table. For some columns I need to add the CSS class according the value I'm printing.

E.g. if it's "OK", add class Green, otherwise class red. Of course the logic will be more complex, but the point is that all the logic will be related to the style.

Which one is the best recommended place to save this type of function/method? Do I need to create a Model?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire