Skip to content

Commit

Permalink
chore: phpstan error
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPunyapal committed Sep 21, 2024
1 parent 51afd95 commit 197b287
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/Livewire/Home/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use App\Models\User;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Support\Facades\Cache;
use Illuminate\View\View;
use Livewire\Attributes\Url;
Expand Down Expand Up @@ -83,11 +84,11 @@ private function defaultUsers(): Collection
->load('links')
->when(auth()->check(), function (Collection $users): void {
$users->loadExists([
'following as is_follower' => function (Builder $query): void {
$query->where('user_id', auth()->id());
'following as is_follower' => function (Relation $relation): void {
$relation->getQuery()->where('user_id', auth()->id());
},
'followers as is_following' => function (Builder $query): void {
$query->where('follower_id', auth()->id());
'followers as is_following' => function (Relation $relation): void {
$relation->getQuery()->where('follower_id', auth()->id());
},
]);
});
Expand Down

0 comments on commit 197b287

Please sign in to comment.