Skip to content

Commit

Permalink
fixed #198
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Jan 22, 2024
1 parent 5be8669 commit 69b56bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/Follower.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function attachFollowStatus($followables, callable $resolver = null)
$item = $followed->where('followable_id', $followable->getKey())
->where('followable_type', $followable->getMorphClass())
->first();
$followable->setAttribute('has_followed', !!$item);
$followable->setAttribute('has_followed', (bool) $item);
$followable->setAttribute('followed_at', $item ? $item->created_at : null);
$followable->setAttribute('follow_accepted_at', $item ? $item->accepted_at : null);
}
Expand Down

0 comments on commit 69b56bd

Please sign in to comment.