Download the PHP package fenos/rally without Composer

On this page you can find all versions of the php package fenos/rally. 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 rally

Rally (Deprecated)

Build Status ProjectStatus Latest Stable Version License

Follow, Let Follow you, Follow with Rally. Rally is a plugin that implement in your application the follow system. It is quick to implement on your laravel project. It give you the freedom to create your own followers system. It is can be polymorphic, so you can follow anybody or anything you want. The package has been released for laravel 4.*

Installation

Step 1

Add it on your composer.json

"fenos/rally": "1.0.*"

and run composer update

Step 2

Add the following string to app/config/app.php

Providers array:

'Fenos\Rally\RallyServiceProvider'

Aliases array:

'Rally'    => 'Fenos\Rally\Facades\Rally'

Step 3

Migration

Make sure that your settings on app/config/database.php are correct, then make the migration typing:

php artisan migrate --package="fenos/rally"

Step 4

Include relations

Rally comes with some relations already setted for you, you just need to insert the trait that I made for you in all your models you wish to have relations with Rally.


class User extends Eloquent
{
    use \Fenos\Rally\Models\Relations;
}

That's it your have done.

Documentation

How i said on the installation, Rally can be Polymorphic, it means that if you have Users and Teams as entity of your application they can follow between them. But it is just up to you. If you realize that you don't need of it, You can keep it as a single model binding.

The key to enable or disable the polymorphic relation is in the configuration files. You just need to push them and change the key polymorphic to true. if instead you want to keep the plugin as 1 model but the User model is not your main model change it ;)

php artisan config:publish fenos/rally

Follow

For start to be followers of a entity when it comes polymorphically you will use the following method let me show you.

try
{
    Rally::follower('User',$user_id)->follow('Team',$team_id);
}
catch(\Fenos\Rally\Exceptions\AlreadyFollowerException $e)
{
    // is already fan
}

With only fews line of code the user has started to follow the team.

If instead you use Rally as normal

try
{
    Rally::follower($user_id)->follow($user_id);
}
catch(\Fenos\Rally\Exceptions\AlreadyFollowerException $e)
{
    // is already follower
}

Let me explain it. The method follower() specify the user that want to be follower, so if Rally comes polymorphically you have to specify as first paramter The model of it, as second parameter the id if instead is not polymorphically just the ID. Almost same the method follow() in this method you specify who will be followed parameters are same.

UnFollow

If you don't want follow someone anymore you will use this method:

Polymorphically

try
{
    Rally::follower('User',$user_id)->unFollow('Team',$team_id);
}
catch(\Fenos\Rally\Exceptions\FollowerNotFoundException $e)
{
    // the user already doesn't follow him
}

Normal

try
{
    Rally::follower($user_id)->unFollow($user_id);
}
catch(\Fenos\Rally\Exceptions\FollowerNotFoundException $e)
{
    // the user already doesn't follow him
}

Check if Is follow of

If you want to know a given User if has following someone use:

Polymorphically

Rally::follower('User',$user_id)->isFollowerOf('Team',$team_id);

Normal

Rally::follower($user_id)->isFollowerOf($user_id); // return Boolean

Get lists of followers

Well Rally give to you a easy way to get the lists of your followers but remeber that you implemented the trait with the relations in your model, So you can even access to them directly from that, I suggest that. But let me show you if you want use Rally.

Polymorphically

Rally::follower('User',$user_id)->getLists();

Rally::follower('User',$user_id)->getLists(['orderBy' => 'DESC', 'limit' => 10]);

Rally::follower('User',$user_id)->getLists(['orderBy' => 'DESC', 'paginate' => 5 ]);

Normal

Rally::follower($user_id)->getLists();

Rally::follower($user_id)->getLists(['orderBy' => 'DESC', 'limit' => 10]);

Rally::follower($user_id)->getLists(['orderBy' => 'DESC', 'paginate' => 5 ]);

You can even chain count() it return a Collection so you can use all the methods of it.

Count Followers

You Need just the numbers of followers and nothing else?

Polymorphically

Rally::follower('User',$user_id)->count();

Normal

Rally::follower($user_id)->count();

I hope you'll enjoy it.

Note

I made it with <3

Tests

For run the tests make sure to have phpUnit and Mockery installed

Credits

© Copyright Fabrizio Fenoglio

Released package under MIT Licence.


All versions of rally with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/support Version ~4.1
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 fenos/rally contains the following files

Loading the files please wait ....