The removal of each element separately, not a mass



  • Getting elements from DB to the website template with a line

    {{ $items->tools->pluck('title', 'tools-url') }}
    

    They are thus released as a body in one element of design.

    <span class="badge">
     <a href="tools-url, tools-url">
      ['Tools-1','Tools-2]
     <a/>
    </span>
    

    How do you get them off on their own?

    <span class="badge">
     <a href="tools-url" class="tools-description">Tools-1</a>
    </span> 
    <span class="badge">
     <a href="tools-url" class="tools-description">Tools-2</a>
    </span>
    


  • So the cycle. https://laravel.com/docs/8.x/blade#loops ♪ ♪ ♪

    If you're right to cry the data.

    @foreach($items->tools->pluck('title', 'tools-url') as $tool)
    <span class="badge">
     <a href="tools-url" class="tools-description">{{ $tool }}</a>
    </span> 
    @endforeach
    


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2