hootlex / laravel-friendships

This package gives Eloquent models the ability to manage their friendships.
MIT License
705 stars 150 forks source link

Method whereRecipient does not exist #98

Closed tquiroga closed 6 years ago

tquiroga commented 6 years ago

I'm using Laravel 5.5, I installed the package, run the migration and added the trait to my User model. When I try to beFriend another user I get that error: Method whereRecipient does not exist.

I've run a simple:

$user1 = User::find(1);
$user2 = User::find(2);
$user1->befriend($user2);
tquiroga commented 6 years ago

My bad, make sure you don't create a method called friends() in the User model. I should have checked the method names in the trait before I add anything ...