Skip to content

Commit be8f51d

Browse files
authored
Merge pull request #66 from agencetwogether/fix/custom-database
fix: update missing subscription table config
2 parents 8ecc4e6 + 3473579 commit be8f51d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/CommentSubscription.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ class CommentSubscription extends Model
1818
'subscriber_type',
1919
];
2020

21+
public function getTable()
22+
{
23+
return Config::getCommentSubscriptionTable();
24+
}
25+
2126
public function subscribable(): MorphTo
2227
{
2328
return $this->morphTo();

src/Config.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ public static function getCommentReactionTable(): string
4141
return config('commentions.tables.comment_reactions', 'comment_reactions');
4242
}
4343

44+
public static function getCommentSubscriptionTable(): string
45+
{
46+
return config('commentions.tables.comment_subscriptions', 'comment_subscriptions');
47+
}
48+
4449
public static function resolveCommentUrlUsing(Closure $callback): void
4550
{
4651
static::$resolveCommentUrl = $callback;

0 commit comments

Comments
 (0)