2017 © Pedro Peláez
 

library dog

A User Follow Package for Laravel 5

image

jeroenherczeg/dog

A User Follow Package for Laravel 5

  • Monday, August 29, 2016
  • by jeroenherczeg
  • Repository
  • 1 Watchers
  • 4 Stars
  • 31 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

A User Follow Package for Laravel 5

Latest Version on Packagist ![Software License][ico-license] Build Status ![Coverage Status][ico-scrutinizer] Quality Score ![Total Downloads][ico-downloads], (*1)

Add a user following system like Twitter, Quora or any other social network that allows you to follow another user and have users follow you., (*2)

Install

You can install the package via composer:, (*3)

``` bash $ composer require jeroenherczeg/dog, (*4)


Next, you must install the service provider: ``` php // config/app.php 'providers' => [ ... Jeroenherczeg\Dog\FollowServiceProvider::class, ];

You can publish the migration with:, (*5)

``` bash php artisan vendor:publish --provider="Jeroenherczeg\Dog\FollowServiceProvider", (*6)


After the migration has been published you can create the `followers` table by running the migrations: ```bash php artisan migrate

Add the followable trait to the User model ``` php use Jeroenherczeg\Dog\Followable;, (*7)

class User extends Model { use Followable; ..., (*8)

## Usage

``` php
// Follow User
$user->follow(1)
$user->follow([1,2,3,4])

// Unfollow User
$user->unfollow(1)
$user->unfollow([1,2,3,4])

// Get Followers
$user->followers()

// Get Followings
$user->followings()

// Check if Follow
$user->isFollowing(1)

// Check if Followed By
$user->isFollowedBy(1)

Change log

Please see CHANGELOG for more information what has changed recently., (*9)

Testing

bash $ composer test, (*10)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*11)

Security

If you discover any security related issues, please email jeroen@herczeg.be instead of using the issue tracker., (*12)

Credits

License

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

Why Dog?

Your dog follows you because it's highly social - has a powerful emotional need for companionship - and knows that you are super-cool. You are the source of all good things in its life: food, walks, rides, treats, toys. Who knows what amazing thing will happen wherever you're going?, (*14)

The Versions

29/08 2016

dev-master

9999999-dev https://github.com/jeroenherczeg/dog

A User Follow Package for Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

jeroenherczeg dog

29/08 2016

0.0.3

0.0.3.0 https://github.com/jeroenherczeg/dog

A User Follow Package for Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

jeroenherczeg dog

16/08 2016

0.0.2

0.0.2.0 https://github.com/jeroenherczeg/dog

A User Follow Package for Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

jeroenherczeg dog

16/08 2016

0.0.1

0.0.1.0 https://github.com/jeroenherczeg/dog

A User Follow Package for Laravel 5

  Sources   Download

MIT

The Requires

  • php ~5.6|~7.0

 

The Development Requires

jeroenherczeg dog