I just needed to add one more relation
on the Post
model for a post's thumbnail and put the condition there to achieve this.
# class Post
public function thumbnail () {
$this->uploads()->where('relation', 'thumbnail');
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community