Download the PHP package cjmellor/engageify without Composer

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

Latest Version on Packagist GitHub Tests Action Status Total Downloads Packagist PHP Version Laravel Version

Engageify is a Laravel package that allows you to integrate engagement features like user reactions (likes, upvotes) to your models.

Engagement Package GitHub Preview-2

Installation

You can install the package via composer:

Publish the config file (optional)

The published config file allows you to customize table names, model relationships, and more.

Usage

For Models you wish to have engagement features (likes/upvotes), use the Engageable trait.

Reactions

Allow Users to react to a Model.

An Event is run on each reaction occurrence.

By default, a User can only react once to a Model. If you wish to allow multiple reactions, you can do so by setting the engagement.allow_multiple_engagements config value to true.

"Like" Specific Reaction

The "like" reaction has some additional functionality. A "like" can be "unliked". This shouldn't be confused with a "dislike" as a "dislike" counts as an engagement, whereas an "unlike" is deleting the engagement.

When a Model is "unliked", an Event is fired.

There is also a convenient toggle() method that will toggle between "like" and "unlike".

Fetch Engagements

Get the counts of the engagements.

Caching Engagement Counts

A caching feature is available, which is off by default but can be changed in the config file, or by adding it to your .env file

When an engagement is retrieved, it is cached, and further requests will retireve the data from the cache.

On each new engagement, the cache will be cleared.

Fetch Users' Who Engaged

Instead of just fetching the amount of engagements, you can fetch the Users who engaged.

`

This will return a Collection of Users who liked the Model.

This works on all 4 fetch methods.

Events

Each engagement has an event that is fired when it occurs.

Here is an example of an Event when a Model is "liked". Each Event will return the same data

When a Model is "unliked", a ModelDisengagedEvent is fired.

Testing

Changelog

Please see the CHANGELOG for more information on what has changed recently.

License

The MIT Licence (MIT). Please see LICENSE for more information.


All versions of engageify with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2|^8.3
illuminate/support Version ^10.0|^11.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 cjmellor/engageify contains the following files

Loading the files please wait ....