{"id":16666395,"url":"https://github.com/fenos/rally","last_synced_at":"2025-10-08T01:49:27.274Z","repository":{"id":17021410,"uuid":"19785424","full_name":"fenos/Rally","owner":"fenos","description":"Follow, Let Follow you, Follow with Rally, for Laravel 4.*","archived":false,"fork":false,"pushed_at":"2016-12-13T22:19:33.000Z","size":42,"stargazers_count":37,"open_issues_count":3,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-19T12:20:05.620Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fenos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-14T15:38:22.000Z","updated_at":"2024-04-27T13:49:11.000Z","dependencies_parsed_at":"2022-09-24T12:20:22.570Z","dependency_job_id":null,"html_url":"https://github.com/fenos/Rally","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/fenos/Rally","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenos%2FRally","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenos%2FRally/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenos%2FRally/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenos%2FRally/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fenos","download_url":"https://codeload.github.com/fenos/Rally/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenos%2FRally/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278877088,"owners_count":26061380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T11:10:50.312Z","updated_at":"2025-10-08T01:49:27.246Z","avatar_url":"https://github.com/fenos.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Rally (Deprecated)\n=====\n\n[![Build Status](https://travis-ci.org/fenos/Rally.svg?branch=master)](https://travis-ci.org/fenos/Rally)\n[![ProjectStatus](http://stillmaintained.com/fenos/Rally.png)](http://stillmaintained.com/fenos/Rally)\n[![Latest Stable Version](https://poser.pugx.org/fenos/rally/v/stable.png)](https://packagist.org/packages/fenos/rally)\n[![License](https://poser.pugx.org/fenos/rally/license.png)](https://packagist.org/packages/fenos/rally)\n\nFollow, 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.\nIt 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.*\n\n* [Installation](#installation)\n* [Documentation](#documentation)\n    * [Follow](#follow)\n    * [unFollow](#unfollow)\n    * [Check if Is follow of](#check-if-is-follow-of)\n    * [Get Lists of followers](#get-lists-of-followers)\n    * [Count Followers](#count-followers)\n    * [Note](#note)\n    * [Tests](#tests)\n    * [Credits](#credits)\n\n\n## Installation ##\n\n### Step 1 ###\n\nAdd it on your composer.json\n\n~~~\n\"fenos/rally\": \"1.0.*\"\n~~~\n\nand run **composer update**\n\n\n### Step 2 ###\n\nAdd the following string to **app/config/app.php**\n\n**Providers array:**\n\n~~~\n'Fenos\\Rally\\RallyServiceProvider'\n~~~\n\n**Aliases array:**\n\n~~~\n'Rally'    =\u003e 'Fenos\\Rally\\Facades\\Rally'\n~~~\n\n### Step 3 ###\n\n#### Migration ####\n\nMake sure that your settings on **app/config/database.php** are correct, then make the migration typing:\n\n~~~\nphp artisan migrate --package=\"fenos/rally\"\n~~~\n\n### Step 4 ###\n\n#### Include relations ###\n\nRally 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.\n\n~~~\n\nclass User extends Eloquent\n{\n    use \\Fenos\\Rally\\Models\\Relations;\n}\n\n~~~\n\nThat's it your have done.\n\n## Documentation ##\n\nHow 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\nyou don't need of it, You can keep it as a single model binding.\n\nThe 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`.\nif instead you want to keep the plugin as 1 model but the `User` model is not your main model change it ;)\n\n~~~\nphp artisan config:publish fenos/rally\n~~~\n\n\n### Follow ###\n\nFor start to be followers of a entity when it comes polymorphically you will use the following method let me show you.\n\n~~~\ntry\n{\n    Rally::follower('User',$user_id)-\u003efollow('Team',$team_id);\n}\ncatch(\\Fenos\\Rally\\Exceptions\\AlreadyFollowerException $e)\n{\n    // is already fan\n}\n~~~\nWith only fews line of code the user has started to follow the team.\n\nIf instead you use **Rally** as normal\n~~~\ntry\n{\n    Rally::follower($user_id)-\u003efollow($user_id);\n}\ncatch(\\Fenos\\Rally\\Exceptions\\AlreadyFollowerException $e)\n{\n    // is already follower\n}\n~~~\n\nLet me explain it. The method `follower()` specify the user that want to be follower, so if Rally comes polymorphically you have to specify as\n`first paramter` The model of it, as `second parameter` the id if instead is not polymorphically just the ID.\nAlmost same the method `follow()` in this method you specify who will be followed parameters are same.\n\n### UnFollow ###\n\nIf you don't want follow someone anymore you will use this method:\n\n**Polymorphically**\n~~~\ntry\n{\n    Rally::follower('User',$user_id)-\u003eunFollow('Team',$team_id);\n}\ncatch(\\Fenos\\Rally\\Exceptions\\FollowerNotFoundException $e)\n{\n    // the user already doesn't follow him\n}\n~~~\n\n**Normal**\n~~~\ntry\n{\n    Rally::follower($user_id)-\u003eunFollow($user_id);\n}\ncatch(\\Fenos\\Rally\\Exceptions\\FollowerNotFoundException $e)\n{\n    // the user already doesn't follow him\n}\n~~~\n\n### Check if Is follow of ###\n\nIf you want to know a given User if has following someone use:\n\n**Polymorphically**\n~~~\nRally::follower('User',$user_id)-\u003eisFollowerOf('Team',$team_id);\n~~~\n\n**Normal**\n~~~\nRally::follower($user_id)-\u003eisFollowerOf($user_id); // return Boolean\n~~~\n\n### Get lists of followers ###\n\nWell Rally give to you a easy way to get the lists of your followers but remeber that you implemented the `trait` with the relations\nin 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.\n\n**Polymorphically**\n~~~\nRally::follower('User',$user_id)-\u003egetLists();\n\nRally::follower('User',$user_id)-\u003egetLists(['orderBy' =\u003e 'DESC', 'limit' =\u003e 10]);\n\nRally::follower('User',$user_id)-\u003egetLists(['orderBy' =\u003e 'DESC', 'paginate' =\u003e 5 ]);\n~~~\n\n**Normal**\n~~~\nRally::follower($user_id)-\u003egetLists();\n\nRally::follower($user_id)-\u003egetLists(['orderBy' =\u003e 'DESC', 'limit' =\u003e 10]);\n\nRally::follower($user_id)-\u003egetLists(['orderBy' =\u003e 'DESC', 'paginate' =\u003e 5 ]);\n~~~\n\nYou can even chain `count()` it return a Collection so you can use all the methods of it.\n\n#### Count Followers ####\n\nYou Need just the numbers of followers and nothing else?\n\n**Polymorphically**\n~~~\nRally::follower('User',$user_id)-\u003ecount();\n~~~\n\n**Normal**\n~~~\nRally::follower($user_id)-\u003ecount();\n~~~\n\nI hope you'll enjoy it.\n\n### Note ###\n\nI made it with \u003c3\n\n### Tests ###\n\nFor run the tests make sure to have phpUnit and Mockery installed\n\n### Credits ###\n\n© Copyright Fabrizio Fenoglio\n\nReleased package under MIT Licence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenos%2Frally","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffenos%2Frally","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenos%2Frally/lists"}