From b21b8fb6ed7c356e6968ee02d61c9ca49b10f78b Mon Sep 17 00:00:00 2001 From: ahmedesa Date: Sat, 25 Jun 2022 11:35:54 +0300 Subject: [PATCH] fix get config from the right file --- src/Traits/Followable.php | 4 ++-- src/Traits/Follower.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Traits/Followable.php b/src/Traits/Followable.php index 0b1e34f..47fbb6c 100644 --- a/src/Traits/Followable.php +++ b/src/Traits/Followable.php @@ -78,7 +78,7 @@ public function followables(): HasMany * @var Model $this */ return $this->hasMany( - config('favorite.followables_model', \Overtrue\LaravelFollow\Followable::class), + config('follow.followables_model', \Overtrue\LaravelFollow\Followable::class), 'followable_id', )->where('followable_type', $this->getMorphClass()); } @@ -89,7 +89,7 @@ public function followers(): BelongsToMany config('auth.providers.users.model'), config('follow.followables_table', 'followables'), 'followable_id', - config('favorite.user_foreign_key', 'user_id') + config('follow.user_foreign_key', 'user_id') )->where('followable_type', $this->getMorphClass()) ->withPivot(['accepted_at']); } diff --git a/src/Traits/Follower.php b/src/Traits/Follower.php index aaf1489..5cee8c3 100644 --- a/src/Traits/Follower.php +++ b/src/Traits/Follower.php @@ -104,8 +104,8 @@ public function followings(): HasMany * @var Model $this */ return $this->hasMany( - config('favorite.followables_model', \Overtrue\LaravelFollow\Followable::class), - config('favorite.user_foreign_key', 'user_id'), + config('follow.followables_model', \Overtrue\LaravelFollow\Followable::class), + config('follow.user_foreign_key', 'user_id'), $this->getKeyName() ); }