laravel-acquaintances
laravel-acquaintances copied to clipboard
getFriendRequests() and getPendingFriendships() seem to output the same results
Hi there,
Thanks for the package. I'v been playing around with it for a while and I seem to run into some strange behaviour.
I created a FriendshipController where I want to call the Auth user's Friendships lists. The friendship requests he received and his pending requests
<?php
namespace App\Http\Controllers;
use Multicaret\Acquaintances\Models\Friendship;
class FriendshipController extends Controller
{
public function indexRequests()
{
$user = Auth::user();
$friendships = $user->getFriendRequests();
Log::info($friendships);
// Some Inertia stuff
}
public function indexPending()
{
$user = Auth::user();
$friendships = $user->getPendingFriendships();
Log::info($friendships);
// Some Inertia stuff
}
}
Both functions output the same results. Not sure if this is a bug or I'm missing something.