display more than one tag on views

Posted 1 year ago by helpmyworld

Good day, how do I display all selected tags to show in my posts views. When I dd, I see that I have more than one tag but on the view, it shows only one, the first tag.

my view

 <dl class="dl-horizontal">
                                @foreach($post->tags as $tag)
                                    <span class="label label-default"><a href="{{route('tags.show',
                                  $tag->id)}}" style="color:white;">{{$tag->name}}</a></span>

My post and tag models are ok.

What else should I show you to help?

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

Reply to

Use Markdown with GitHub-flavored code blocks.