Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.
0

Couple things seems to not be correct. First it sounds like you want a many-to-many relationship. That would make it

        return $this->belongsToMany('Tiles\TileTag');

Second. This line doesn't make sense

<li class="col-md-4 mix" data-category="{{ $tile->tags->tag_title }}">

isn't $tile->tags a collection? So you would need to iterate over it.

foreach ($tile->tags as $tag) {
//
}
Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

AoiHana35 aoihana35 Joined 24 Jan 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.