2017 © Pedro Peláez
 

library laravel-acquaintances

This package gives Eloquent models the ability to manage friendships (with groups), interactions along with Likes, favorites..etc .

image

liliom/laravel-acquaintances

This package gives Eloquent models the ability to manage friendships (with groups), interactions along with Likes, favorites..etc .

  • Tuesday, June 26, 2018
  • by LiliomLab
  • Repository
  • 6 Watchers
  • 18 Stars
  • 27 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 200 % Grown

The README.md

Laravel Acquaintances

Total Downloads Latest Version License, (*1)

Laravel Acquaintances, (*2)

Clean, modular social features for Eloquent models: Friendships, Verifications, Interactions (Follow/Like/Favorite/Report/Subscribe/Vote/View), and multi-type Ratings., (*3)

  • PHP >= 8.0
  • Illuminate components ^9.0 | ^10.0 | ^11.0 | ^12.0 (Laravel 9–12)
  • Laravel News: https://laravel-news.com/manage-friendships-likes-and-more-with-the-acquaintances-laravel-package

TL;DR

$user1 = User::find(1);
$user2 = User::find(2);

// Friendships
$user1->befriend($user2);
$user2->acceptFriendRequest($user1);

// The messy breakup :(
$user2->unfriend($user1);

// Verifications (message is optional)
$user1->verify($user2, "Worked together on several Laravel projects.");
$user2->acceptVerificationRequest($user1);

if ($user1->isVerifiedWith($user2)) {
    echo "Verified!";
}

Documentation

To keep this README concise, the full documentation lives under docs/: - Overview - Installation - Configuration - Friendships - Verifications - Interactions (Follow/Like/Favorite/Report/Subscribe/Vote/View) - Ratings - Migrations - Events - Testing - FAQ - Upgrade Notes, (*4)

Quickstart

1) Install, (*5)

composer require multicaret/laravel-acquaintances

2) Publish (optional) and migrate, (*6)

php artisan vendor:publish --provider="Multicaret\\Acquaintances\\AcquaintancesServiceProvider"
php artisan migrate

3) Add traits to your models, (*7)

use Multicaret\\Acquaintances\\Traits\\Friendable;
use Multicaret\\Acquaintances\\Traits\\Verifiable;
use Multicaret\\Acquaintances\\Traits\\CanFollow;
use Multicaret\\Acquaintances\\Traits\\CanBeFollowed;
use Multicaret\\Acquaintances\\Traits\\CanLike;
use Multicaret\\Acquaintances\\Traits\\CanBeLiked;
use Multicaret\\Acquaintances\\Traits\\CanRate;
use Multicaret\\Acquaintances\\Traits\\CanBeRated;

class User extends Model {
    use Friendable, Verifiable;
    use CanFollow, CanBeFollowed;
    use CanLike, CanBeLiked;
    use CanRate, CanBeRated;
}

Explore the feature guides linked above for full APIs and examples., (*8)

Compatibility

  • Laravel 9–12 (Illuminate components only; no laravel/framework hard dependency)
  • PHP >= 8.0

Contributing / Changelog

  • Contributing: see CONTRIBUTING.md
  • Changes: see CHANGELOG.md

The Versions

26/06 2018

dev-master

9999999-dev

This package gives Eloquent models the ability to manage friendships (with groups), interactions along with Likes, favorites..etc .

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Hussam Abd

laravel eloquent friends friendships friend-system social-media like followers interactions followships wish-list

26/06 2018

v1.1.1

1.1.1.0

This package gives Eloquent models the ability to manage friendships (with groups), interactions along with Likes, favorites..etc .

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Hussam Abd

laravel eloquent friends friendships friend-system social-media like followers interactions followships wish-list

24/06 2018

v1.1.0

1.1.0.0

This package gives Eloquent models the ability to manage friendships (with groups), interactions along with Likes, favorites..etc .

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Hussam Abd

laravel eloquent friends friendships friend-system social-media like followers interactions followships wish-list

24/06 2018

v1.0.13

1.0.13.0

This package gives Eloquent models the ability to manage friendships (with groups), interactions along with Likes, favorites..etc .

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Hussam Abd

laravel eloquent friends friendships friend-system social-media like followers interactions followships wish-list

24/06 2018

v1.0.12

1.0.12.0

This package gives Eloquent models the ability to manage friendships (with groups), interactions along with Likes, favorites..etc .

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Hussam Abd

laravel eloquent friends friendships friend-system followers followships

30/01 2018

v1.0.11

1.0.11.0

This package gives Eloquent models the ability to manage friendships (with groups), followships along with Likes, favorites..etc .

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Hussam Abd

laravel eloquent friends friendships friend-system followers followships

30/01 2018

v1.0.1

1.0.1.0

This package gives Eloquent models the ability to manage friendships (with groups), followships along with Likes, favorites..etc .

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Hussam Abd

laravel eloquent friends friendships friend-system followers followships

23/01 2018

v1.0.0

1.0.0.0

This package gives Eloquent models the ability to manage friendships (with groups), followships along with Likes, favorites..etc .

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Hussam Abd

laravel eloquent friends friendships friend-system followers followships