Download the PHP package binafy/laravel-score without Composer
On this page you can find all versions of the php package binafy/laravel-score. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download binafy/laravel-score
More information about binafy/laravel-score
Files in binafy/laravel-score
Package laravel-score
Short Description Laravel Score is a lightweight and flexible package for adding scoring functionality to any Eloquent model in a Laravel application
License MIT
Informations about the package laravel-score
Laravel Score

Introduction
A comprehensive Laravel package to implement scoring systems effortlessly. Whether you're building leaderboards, calculating performance metrics, or managing gamification features, Laravel Score provides an intuitive API to define, calculate, and manage scores seamlessly. Perfect for applications requiring dynamic and flexible scoring mechanisms.
Key Features:
- Simple integration with Eloquent models.
- Support for customizable scoring rules.
- Designed for performance and scalability.
- Extensible and developer-friendly.
Installation
You can install the package with Composer.
Publish
If you want to publish a config file you can use this command:
If you want to publish the migrations you can use this command:
For convenience, you can use this command to publish config, migration, and ... files:
After publishing, run the php artisan migrate
command.
Usage
To enable scoring functionality, you need to use two traits:
On the model giving the score (e.g. User
):
On the model receiving the score (e.g. Photo
):
Add Score
To give a positive score to a scoreable model:
Add Negative Score
To assign a negative score:
Checking Scores
You can check whether a model has already been scored by a specific user:
Count Scores
To get the total number of scores for a model:
Delete score
To remove an existing score:
Contributors
Thanks to all the people who contributed. Contributors.
Security
If you discover any security-related issues, please email [email protected]
instead of using the issue tracker.
Changelog
The changelog can be found in the CHANGELOG.md
file of the GitHub repository. It lists the changes, bug fixes, and improvements made to each version of the Laravel User Monitoring package.
License
The MIT License (MIT). Please see License File for more information.
Star History
Donate
If this package is helpful for you, you can buy a coffee for me :) ❤️
- Iranian Gateway: https://daramet.com/milwad_khosravi
- Paypal Gateway: SOON
- MetaMask Address:
0xf208a562c5a93DEf8450b656c3dbc1d0a53BDE58