Download the PHP package hypefactors/laravel-follow without Composer

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

Laravel Follow

Build Status Software License Latest Version on Packagist Total Downloads

Laravel 10 Follow System for Eloquent models.

This package is compliant with the FIG standards PSR-1, PSR-2 and PSR-4 to ensure a high level of interoperability between shared PHP. If you notice any compliance oversights, please send a patch via pull request.

Version Matrix

Version Laravel PHP Version
9.x 10.x >= 8.1
8.x 9.x >= 8.0
7.x 8.x >= 7.3
6.x 7.x >= 7.2.5
5.x 6.x >= 7.2
4.x 5.8.x >= 7.1
3.x 5.7.x >= 7.1
2.x 5.6.x >= 7.1
1.x 5.5.x >= 7.0

Installation

You can install the package via composer:

The package will be automatically registered.

Now you need to run the migrations:

Usage

Preparing the Eloquent Models

To allow an entity to be followed or to follow other entities, the corresponding models have to implement an interface and make usage of a trait.

Here's how we do it for a User and Company entity, where a user will be able to follow a company and the company will be able to be followed:

Note: If required, an entity can follow and can also be followed, just implement both interfaces and traits on the same model to achieve that requirement.

Following an Entity

You can follow an entity like this:

You can also perform the same through the entity that's going to be followed:

Follow Many Entities

You can follow many entities like this:

You can also perform the same through the entity that's going to be followed:

Unfollowing an Entity

You can unfollow an entity like this:

You can also perform the same through the entity that's going to be unfollowed:

Unfollow Many Entities

You can unfollow many entities like this:

You can also perform the same through the entity that's going to be unfollowed:

Determining if an Entity is Following another Entity

You can unfollow an entity like this:

You can also perform the same through the entity that's going to be followed:

Determine if an Entity has Followings

Determine if an Entity has Followers

Get list of Followings

To get a list of followings (entities another entity is following)

Get List of Followers

To get a list of followers (entities that are following an entity)

Get List of Followings by Entity Type

Get a list of followings (entities another entity is following) and filter by an entity type

Get List of Followers by Entity Type

Get a list of followers (entities that are following an entity) and filter by an entity type

Contributing

Thank you for your interest in Laravel Follow. Here are some of the many ways to contribute.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

Laravel Follow is licenced under the BSD 3-Clause License. Please see the license file for more information.


All versions of laravel-follow with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0
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 hypefactors/laravel-follow contains the following files

Loading the files please wait ....