laravel-acquaintances icon indicating copy to clipboard operation
laravel-acquaintances copied to clipboard

getFriendRequests() and getPendingFriendships() seem to output the same results

Open kwindo opened this issue 2 years ago • 0 comments

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.

kwindo avatar Jun 09 '22 15:06 kwindo