Likes relationship
kuvallini opened this issue · comments
kuvallini commented
I would recommend to add likes relationship:
public function likes(): \Illuminate\Database\Eloquent\Relations\MorphMany
{
return $this->morphMany(config('like.like_model'), 'likeable');
}
In the same way as you did in Favorites. It is useful for delete all linked likes to the object, etc.
安正超 commented
kuvallini commented
huh, thank you for such wonderful package