I need to edit a tiny piece of code on a laravel based website, but I'm not familiar with laravel syntax, so I don't know how to do this. Basically, there is a foreach loop that lists news articles. Inside of each article there is a p tag with a class "news-entry-meta", which contains two span tags, the first one displaying a post date, and the second one listing tags. My problem is that tags should not be listed inside a single span, but instead each tag should be listed inside its own span with classes "badge badge-pill badge-default". How do I do this?
@foreach ($news as $n)
<article class="news-entry grid-item col-12 col-md-6 col-lg-4 {{$n->tagsList}}" data-tags="{{$n->tagsList}}">
<a href="{{URL::to('/')}}/news/{{str_slug($n->title, '-')}}" class="news-entry-featured">
<img src="{{ $n->getThumbnail(720, 360) }}" class="news-entry-featured-img img-fluid" alt="image">
</a>
<div class="news-entry-text">
<p class="news-entry-meta d-flex justify-content-end align-items-center">
<span class="mr-auto">{{ Carbon\Carbon::parse($n->created_at)->format('d M Y') }}</span>
<span class="badge badge-pill badge-default">{{$n->tagsList}}</span>
</p>
<h3 class="news-entry-title">{{$n->title}}</h3>
<p class="news-entry-excerpt">{{str_limit($n->description, 100, '...')}}</p>
<a href="{{URL::to('/')}}/news/{{str_slug($n->title, '-')}}" class="news-entry-more">read more</a>
</div>
</article>
@endforeach