gregoryduckworth/friendable
Larablocks Analysis
gregoryduckworth/friendable works with Laravel 5 (latest release 0.2, Sep 14, 2015), which reached end of life: no more fixes, even for security.
Recommendation checks
Use with careUse with care: meets 0 of 4 checks.
- Supports only Laravel 5, past end of life
- No release in the last 12 months (last: Sep 14, 2015)
- 0 downloads a month (needs 10,000)
- 2 GitHub stars (needs 100)
State
Quiet- Last stable release: Sep 14, 2015.
- No releases in the last 12 months.
- First released: Aug 21, 2015.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 27, 2026.
| Install | |
|---|---|
composer require gregoryduckworth/friendable |
|
| Latest Version: | 0.2 |
| PHP: | >=5.3.0 |
| Laravel: | 5 |
| License: | MIT |
| Last Updated: | Aug 14, 2026 |
| Links: | GitHub · Packagist |
Friendable
Add the possibility of friends quickly with the use of this trait.
Requirements
- PHP 8.2+
- Laravel 9.6+, 10.x, 11.x, or 12.x
Install
Via Composer
$ composer require gregoryduckworth/friendable
The service provider will be automatically registered via Laravel's package auto-discovery.
Publish and run the migration:
php artisan vendor:publish --provider="GregoryDuckworth\Friendable\FriendableServiceProvider" --tag="migrations"
php artisan migrate
Usage
Add the Trait to the User Model
use GregoryDuckworth\Friendable\Traits\Friendable;
class User extends Model
{
use Friendable;
...
}
Examples
List all the users confirmed friends
$user->confirmedFriends();
List all the users pending friends
$user->pendingFriends();
List all the friends waiting to approve the user
$user->awaitingApproval();
Request the friendship of another user
$user->requestFriendship(Model $friend);
Confirm the friendship
$user->confirmFriendship(Model $friend);
Remove the friendship
$user->removeFriendship(Model $friend);
Todo
- Add tests (inc travis builds)
- Ability to block friends
Change log
Please see CHANGELOG for more information what has changed recently.
License
The MIT License (MIT). Please see License File for more information.
Related Packages
This package gives Eloquent models the ability to manage their followers.
A polymorphic friendship system for Laravel — friend requests, blocking, mutual...
This package gives Eloquent models the ability to manage their friendships.
This package gives Eloqent models the ability to manage their friendships.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 0.2 | >=5.3.0 | ~5.1 | MIT | |
| 0.1 | >=5.3.0 | ~5.1 | MIT |
