How to foreach this data

Posted 2 months ago by AliTalib

The extraction values are separate and non-duplicated

this my database table

When it is extracted it is like this

I want to be like that

Please apply to this example

@foreach($genres as $genre)

<a href="{{ url('cinema/movies/genre/'.$genre->genre) }}" class="item">{{ $genre->genre }}</a>


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

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.