Skip to content

Commit

Permalink
feat: update likes for user model
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Sep 28, 2024
1 parent 1c0a46a commit 2384cc2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Traits/UserHasInteraction.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
trait UserHasInteraction
{
/**
* Get all likes of the user. This method is used for eager loading.
*
* @return HasMany
*/
public function like(): HasMany
public function likes(): HasMany
{
$interactionModel = (string) (config('like.interaction_model') ?? 'CSlant\LaravelLike\Models\Like');
$userForeignKey = (string) (config('like.users.foreign_key') ?? 'user_id');
Expand Down

0 comments on commit 2384cc2

Please sign in to comment.