Skip to content

Commit 1788395

Browse files
committed
add is_reacted attribute
1 parent 00e9928 commit 1788395

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Traits/Reactable.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,15 @@ public function getReactCountByType(string|LaravelReactionTypeEnum $type): int
7474
{
7575
return $this->reactions()->where('type', $type)->count();
7676
}
77+
78+
// Attributes
79+
80+
81+
/**
82+
* Get is_reacted attribute.
83+
*/
84+
public function isReactedAttribute(): bool
85+
{
86+
return $this->isReacted();
87+
}
7788
}

0 commit comments

Comments
 (0)