title: Laravel: how to list each post tag inside its own span?
body: <p>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?</p>
  
  <pre><code>    @foreach ($news as $n)
      &lt;article class="news-entry grid-item col-12 col-md-6 col-lg-4 {{$n-&gt;tagsList}}" data-tags="{{$n-&gt;tagsList}}"&gt;
          &lt;a href="{{URL::to('/')}}/news/{{str_slug($n-&gt;title, '-')}}" class="news-entry-featured"&gt;
          &lt;img src="{{ $n-&gt;getThumbnail(720, 360) }}" class="news-entry-featured-img img-fluid" alt="image"&gt;
        &lt;/a&gt;
        &lt;div class="news-entry-text"&gt;
          &lt;p class="news-entry-meta d-flex justify-content-end align-items-center"&gt;
            &lt;span class="mr-auto"&gt;{{ Carbon\Carbon::parse($n-&gt;created_at)-&gt;format('d M Y') }}&lt;/span&gt;
            &lt;span class="badge badge-pill badge-default"&gt;{{$n-&gt;tagsList}}&lt;/span&gt;
          &lt;/p&gt;
          &lt;h3 class="news-entry-title"&gt;{{$n-&gt;title}}&lt;/h3&gt;
          &lt;p class="news-entry-excerpt"&gt;{{str_limit($n-&gt;description, 100, '...')}}&lt;/p&gt;
          &lt;a href="{{URL::to('/')}}/news/{{str_slug($n-&gt;title, '-')}}" class="news-entry-more"&gt;read more&lt;/a&gt;
        &lt;/div&gt;
      &lt;/article&gt;
      @endforeach
  </code></pre>