Skip to content

Commit

Permalink
Merge pull request #175 from ahmedesa/fix_get_from_config_file
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue authored Jun 25, 2022
2 parents ce6cf9e + b21b8fb commit c91aa48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Traits/Followable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand All @@ -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']);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/Follower.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
}
Expand Down

0 comments on commit c91aa48

Please sign in to comment.