Closed firescript closed 6 years ago
to fix I had to extend the Category class into my own app, then change the discussions method in Category model from:
public function discussions()
{
return $this->hasMany(Models::className(Discussion::class));
}
TO
public function discussions()
{
return $this->hasMany('DevDojo\Chatter\Models\Discussion','chatter_category_id','id');
}
We are open to pull requests with this 👍 Thanks
Sent in the PR - closing this issue.
I'm just building a simple discussion management backend for chatter in my app. In the controller i'm passing down:
When I try and access the discussions off category model from inside a $categories for loop
{{dd($category->discussions)}}
I get this error: