2017 © Pedro Peláez
 

library friendable

Add the possibility of friends quickly with the use of this trait.

image

gregoryduckworth/friendable

Add the possibility of friends quickly with the use of this trait.

  • Monday, September 14, 2015
  • by gregoryduckworth
  • Repository
  • 0 Watchers
  • 2 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Friendable

Latest Stable Version Total Downloads Build Status License, (*1)

Add the possibility of friends quickly with the use of this trait., (*2)

Install

Via Composer, (*3)

``` bash $ composer require gregoryduckworth/friendable, (*4)

And then include the service providero within `config/app.php`

```php
'providers' => [
    ...
    GregoryDuckworth\Friendable\FriendableServiceProvider::class,
    ...
];

At lastly you need to publish and run the migration., (*5)

php artisan vendor:publish && 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., (*6)

License

The MIT License (MIT). Please see License File for more information., (*7)

The Versions

14/09 2015

dev-master

9999999-dev https://github.com/gregoryduckworth/friendable

Add the possibility of friends quickly with the use of this trait.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gregory Duckworth

laravel friends friendable

14/09 2015

0.2

0.2.0.0 https://github.com/gregoryduckworth/friendable

Add the possibility of friends quickly with the use of this trait.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gregory Duckworth

laravel friends friendable

21/08 2015

0.1

0.1.0.0 https://github.com/gregoryduckworth/friendable

Add the possibility of friends quickly with the use of this trait.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gregory Duckworth

laravel friends friendable