Rainieren
1 year ago

Laravel - Give specific names in database specific colours in blade

Posted 1 year ago by Rainieren

Hello, I followed Jeffrey's tutorial, and I want to make use of the channel concept as well. But I'm trying to figure out how I can give specific channel names specific colours, say, For instance, the channel with the name "Plants" needs to be green while the channel with the name "Fire" needs to be red. How can I accomplish this the most efficient way? I display my channel names in blade using {{ $post->channel->channel_name }}. Thanks in advance!

Please sign in or create an account to participate in this conversation.