Download the PHP package arubacao/friends without Composer

On this page you can find all versions of the php package arubacao/friends. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package friends

Unmaintained

This package is unmaintained and was only a quick hacking around. Don't use in production code.

Friends (Laravel 5 Package)

Build Status Latest Version SensioLabsInsight Quality Score Code Coverage codecov

Organise Friends and Relationships Between Users in Laravel and Lumen.

Friends provides everything you need to easily implement your own Facebook like Friend System.

Users can:

Contents

Installation

For Laravel 5.*

Pull in Package with Composer

composer require arubacao/friends

Register Service Provider

Include the service provider inside config/app.php.

Run Migrations

Publish the migration and migrate the database

After the migration, 1 new table will be created:

The vendor:publish command will also create a friends.php file in your config directory.
The default configuration should work just fine for most applications.
Otherwise check out Configuration.

Prepare User Model

Include Friendable Trait in User Model

And you are ready to go.

Configuration

Configuration File friends.php (Optional)

Find friends.php in your config folder. Make sure you published the package beforehand.

  • user_model — This is the applications User model used by Friends.
  • users_table — This is the applications users table name used by Friends.

Usage

Friend Requests

Send Friend Request

$user must be instance of User
$recipient must be instance of User, User array or integer (User id)

Accept Friend Request

$user must be instance of User
$sender must be instance of User, User array or integer (User id)

Deny Friend Request

$user must be instance of User
$sender must be instance of User, User array or integer (User id)

My Friends

Delete Friend

$user must be instance of User
$douchebag must be instance of User, User array or integer (User id)

Retrieve Friends

  • Get all friends of a user
  • status is always 1 ACCEPTED

$user must be instance of User

$friends:

Retrieve Incoming Friends

  • Get all users who send friend request to $user
  • status is always 0 PENDING
  • recipient_id is always id of $user

$user must be instance of User

$friends:

Retrieve Any Friends

Remember:

Just like in the real life a 'friend' or 'friendship' can be anything, also negative ;)

  • Get all users who have any kind of friendship/relationship with $user

$user must be instance of User

$friends:

Relationships

Has Relationship With

$user must be instance of User
$person must be instance of User, User array or integer (User id)
$status must be array of integers (Status)

Get Relationship With

$user must be instance of User
$person must be instance of User, User array or integer (User id)
$status must be array of integers (Status)

Has Pending Request From

$user must be instance of User
$person must be instance of User, User array or integer (User id)

Query Users Including Relationships

$users:

License

Friends is free software distributed under the terms of the MIT license.

Analytics


All versions of friends with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
illuminate/database Version ^5.2
illuminate/support Version ^5.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package arubacao/friends contains the following files

Loading the files please wait ....