2017 © Pedro Peláez
 

library followers

image

dutkan/followers

  • Wednesday, May 14, 2014
  • by olgundutkan
  • Repository
  • 0 Watchers
  • 0 Stars
  • 6 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel 4 Basic Follower Package

This Laravel 4 package provides a command. These generator include:, (*1)

follow:model, (*2)

Package Inslallation

Begin by installing this package through Composer. Edit your project's composer.json file to require dutkan/followers., (*3)

"require": {
    "laravel/framework": "4.1.*",
    "dutkan/followers": "dev-develop"
}

Next, update Composer from the Terminal:, (*4)

composer update

Once this operation completes, the final step is to add the service provider. Open app/config/app.php, and add a new item to the providers array., (*5)

'Dutkan\Followers\FollowersServiceProvider'

Migrations

You can installing the package' s migration file into your application, by running the follwing command:, (*6)

php artisan migrate --package="dutkan/followers"

Create Model

That's it! You're all set to go. Run the artisan command from the Terminal to see the new follow:model commands., (*7)

php artisan follow:model Follow

Configuration

After installing, you can publish the package's configuration file into your application, by running the following command:, (*8)

php artisan config:publish dutkan/followers

This will publish the config file to app/config/packages/dutkan/followers/config.php where you modify the package configuration., (*9)

Use

To add the current user's followers, (*10)

try {

    $follow = Follower::followTo(1);

    return Redirect::to('/');

    } catch (Dutkan\Followers\Exceptions\AuthenticationException $e) {

        return $e->getMessage();

    }

or remove the current user's followers, (*11)

try {

    $follow = Follower::unfollowFrom(1);

    return Redirect::to('/');

    } catch (Dutkan\Followers\Exceptions\AuthenticationException $e) {

        return $e->getMessage();

    }

The Versions

14/05 2014

dev-develop

dev-develop

  Sources   Download

The Requires

 

by Dutkan