dereuromark / cakephp-favorites
CakePHP Favorites Plugin
Installs: 693
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 1
Type:cakephp-plugin
Requires
- php: >=8.1
- cakephp/cakephp: ^5.0.0
Requires (Dev)
- cakephp/migrations: ^4.0.1
- dereuromark/cakephp-tinyauth: ^4.1.0
- fig-r/psr2r-sniffer: dev-master
- phpunit/phpunit: ^10.5
This package is auto-updated.
Last update: 2024-10-23 13:16:52 UTC
README
Favorites plugin for CakePHP applications.
This branch is for use with CakePHP 5.0+. For details see 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 Claps
This 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 for details.
Demo
See https://sandbox.dereuromark.de/sandbox/favorite-examples