We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm getting a list of the logged in user's followers, and it's only returning each follower's ID
auth()->user()->followings
So in order to get the follower's names, I need to do a separate query.
$ids = []; foreach (auth()->user()->followings as $followed) { $ids[] = $followed->followable_id; } $this->following = User::whereIn('id', $ids)->get();
Is this the correct way? Or are there relationships defined and just not documented? Am I missing something?
The expected behavior to me would be like this
@foreach(auth()->user()->followings as $user) {{ $user->name }} @endforeach
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm getting a list of the logged in user's followers, and it's only returning each follower's ID
So in order to get the follower's names, I need to do a separate query.
Is this the correct way? Or are there relationships defined and just not documented? Am I missing something?
The expected behavior to me would be like this
The text was updated successfully, but these errors were encountered: