Download the PHP package furic/leaderboards without Composer

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

laravel-leaderboards

Packagist Packagist License Scrutinizer Code Quality Build Status

Leaderboards management for Laravel 5.*. This package is developed while working for a leaderboard solution in Sweaty Chair Studio, serving leaderboards to players. This contains RESTful API for reading the leaderboard in daily, weekly, monthly or all-time period, reporting players' scores to server, as well as getting reward for top ranks.

There are two type of leaderboard:

  • Highscore: The standard leaderboard, each player has ONE highest score within the period.
  • Score-sum: The leaderboard that summing up all scores reported by each player, e.g. seasonal event for collecting the most in-game items within the period.

The web console is in the TODO list. Meanwhile, you will need to setup the leaderboards in the database manually.

Table of Contents

Installation

Install this package via Composer:

If you are using Laravel 5.5 or later, then installation is done. Otherwise follow the next steps.

Open config/app.php and follow steps below:

Find the providers array and add our service provider.

Configuration

To create table for redeem codes in database run:

Usage

Leaderboards Table

Leaderboard settings, you would need to set up this mannually.

Leaderboard Timescopes Table

Leaderboard Timescopes are the entries for each leaderboard period, for example, a daily leaderboard will have one entry per day. Each entry is created automatically when the first player report score in a new period.

Leaderboard Scores Table

Leaderboard Scores are the score entries of the players within the leaderboard timescope period. Each entry is created automatically when the player report score.

Leaderboard Rewards Table

Leaderboard Rewards are the rewards for players achriving given rank or score sum, optional only if you have rewards for leaderboard and you would need to set up this mannually.

Leaderboard Player Rewards Table

Leaderboard Player Rewards are the reward entries for each player. Each entry is created automatically when the player obtain a reward.

API URLs

GET <server url>/api/leaderboards Returns a JSON array containing all valid leaderboards, for debug purpose only.

GET <server url>/api/leaderboards/{id} Returns a JSON data containing the leaderboards with given ID, for debug purpose only.

GET <server url>/api/leaderboards/{id}/current Returns a JSON data containing the current leaderboard timescope and reward info.

GET <server url>/api/leaderboards/{id}/score-sums Returns a JSON array containing all score-sum entries around the player's score-sum entry.

GET <server url>/api/leaderboards/{id}/highscores Returns a JSON array containing all highscore entries around the player's highscore entry.

GET <server url>/api/leaderboards/{id}/rewards Returns a JSON data containing all rewards the player can be obtained in current (score-sum) and previous (rank) leaderboard timescope period.

POST <server url>/api/leaderboards/{id}/score Reports a score of the player and creates the relevant database entries.

POST <server url>/api/leaderboards/{id}/reward Reports a reward obtain of the player and creates the relevant database entries.

API Document can be found here.

Unity Client Repo

You can simply import this repo in Unity to communicate with your Laravel server with this package: <to be added>

TODO

Alternative Solutions

Before you start running and developing your Laravel server, you should always consider other leaderboard solutions first:

License

laravel-leaderboards is licensed under a MIT License.


All versions of leaderboards with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
laravel/framework Version ~5.8||~6.0||~7.0||~8.0
furic/game-essentials Version ^1.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 furic/leaderboards contains the following files

Loading the files please wait ....