Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dereuromark/cakephp-favorites
Favorites Plugin for CakePHP
https://github.com/dereuromark/cakephp-favorites
Last synced: 12 days ago
JSON representation
Favorites Plugin for CakePHP
- Host: GitHub
- URL: https://github.com/dereuromark/cakephp-favorites
- Owner: dereuromark
- License: mit
- Created: 2024-03-31T18:29:04.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-09-16T20:52:25.000Z (about 2 months ago)
- Last Synced: 2024-10-11T06:32:39.209Z (29 days ago)
- Language: PHP
- Size: 118 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cakephp - Favorites plugin - Allows users to star/like/favor records. (Social)
README
# CakePHP Favorites Plugin
[![CI](https://github.com/dereuromark/cakephp-favorites/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/dereuromark/cakephp-favorites/actions?query=workflow%3ACI+branch%3Amaster)
[![Coverage Status](https://img.shields.io/codecov/c/github/dereuromark/cakephp-favorites/master.svg)](https://app.codecov.io/github/dereuromark/cakephp-favorites/tree/master)
[![PHPStan](https://img.shields.io/badge/PHPStan-level%208-brightgreen.svg?style=flat)](https://phpstan.org/)
[![Latest Stable Version](https://poser.pugx.org/dereuromark/cakephp-favorites/v/stable.svg)](https://packagist.org/packages/dereuromark/cakephp-favorites)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.1-8892BF.svg)](https://php.net/)
[![License](https://poser.pugx.org/dereuromark/cakephp-favorites/license.png)](https://packagist.org/packages/dereuromark/cakephp-favorites)
[![Total Downloads](https://poser.pugx.org/dereuromark/cakephp-favorites/d/total.svg)](https://packagist.org/packages/dereuromark/cakephp-favorites)Favorites plugin for CakePHP applications.
This branch is for use with **CakePHP 5.0+**. For details see [version map](https://github.com/dereuromark/cakephp-favorites/wiki#cakephp-version-map).
## Motivation
The old Favorites plugins don't seem to be supported anymore:
- https://github.com/CakeDC/favorites (Cake 2)
- Similar to https://github.com/aschelch/cakephp-like-plugin (Cake 2)This plugin aims to merge and revive them as modern CakePHP 5.x plugin.
Hopefully we can have all the features back up and working soon.## Features
"Favorites" lets people express how they feel about some content.
Make any model reactable in a minutes!There are many implementations in modern applications:
- Starred a.k.a GitHub stars (and remove star)
- GitHub Reactions
- Facebook Reactions
- YouTube Likes
- Slack Reactions
- Reddit Votes
- Medium ClapsThis package so far mainly supports basic reactions per entity in 3 different types:
- **star** (yes/no)
- **like** (upvote/downvote/none)
- **favorite** (custom enum list)But it could be developed in mind that it should cover all the possible use cases and
be viable in enterprise applications including multiple reactions per entity.
Help is appreciated.A "counter-cache" field can be put on the starred record itself, to more easily count the
"stars" without having to calculate it at runtime.For ratings (e.g. 1-5 star range) use https://github.com/dereuromark/cakephp-ratings instead.
### Install, Setup, Usage
See the **[Docs](docs/README.md)** for details.### Demo
See https://sandbox.dereuromark.de/sandbox/favorite-examples