PHPackages                             devtemple/lara-lol - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. devtemple/lara-lol

ActiveLibrary[API Development](/categories/api)

devtemple/lara-lol
==================

This is a package, which help you work simplier with League of Legends API

v1.0(7y ago)0221MITPHPPHP &gt;=7.1.0

Since Oct 22Pushed 6y ago1 watchersCompare

[ Source](https://github.com/AdrianKuriata/lara-lol)[ Packagist](https://packagist.org/packages/devtemple/lara-lol)[ RSS](/packages/devtemple-lara-lol/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Laralol
=======

[](#laralol)

This is a Laravel package which let you faster getting data from League of Legends API.

Getting Started
---------------

[](#getting-started)

Install this package with packagist.

### Installing

[](#installing)

Type with you terminal:

```
composer require devtemple/lara-lol

```

### Set API key

[](#set-api-key)

Open your *.env* file and set a `LARALOL_API_KEY` which you can generate on the League of Legends developers API page

### Options

[](#options)

You can export config files:

```
php artisan vendor:publish --tag=laralol-config

```

Default server:

```
default_server

```

Default season:

```
default_season

```

Possible is define server with every new call endpoint with function:

```
server($server)

```

ex.

```
use Devtemple\Laralol\Facades\Champion;

Champion::server('euw1')->get();

```

### How use

[](#how-use)

League of Legends API giving use some endpoint to get different data from the RIOT servers.

Every call to endpoint require one function:

```
get($fields)

```

If you want, you can set attribute with fields you want get from the call. You can define array with fields or one field. You can set it empty and get all data from the endpoint.

ex.

```
get('field') or get(['field1', 'field2']) or get()

```

List of all fields for specific endpoints you can find on [League of Legends API Full Reference](https://developer.riotgames.com/api-methods/)

#### Champion

[](#champion)

Champion endpoint let us get some data about champions. This endpoint don't have any specified for it functions.

ex.

```
use Devtemple\Laralol\Facades\Champion;

Champion::get();

```

#### Champion Mastery

[](#champion-mastery)

Champion Mastery Endpoint let us get information about masteries champions for specified summoner. We have some functions which we can use for get some data.

This function let us get a scores for specified summoner ID

```
scores($summonerId);

```

This function give us information about scores for every summoner champion by summoner ID

```
masteries($summonerId);

```

This function give us information about scores for specific champion ID and summoner ID

```
masteriesByChampion($summonerId, $championId);

```

ex.

```
use Devtemple\Laralol\Facades\ChampionMastery;

ChampionMastery::scores($summonerId)->get();

or

ChampionMastery::masteries($summonerId)->get();

or

ChampionMastery::masteriesByChampion($summonerId, $championId);

```

#### League

[](#league)

League endpoint give you some data about challenger and masters leagues and leagues for specified summoners. You can do this with some specified functions.

This combination functions let you get information about challenger or master league:

```
tier($tier); // available options: master or chall

queue($queue); // available options: solo (RANKED_SOLO_5x5) or flex (RANKED_FLEX_SR) or flextt (RANKED_FLEX_TT)

league(); // is required to get specified league - check on examples to see how to use it

```

This function let you get league by league ID

```
findById($leagueId);

```

This function let you get leagues for specified summoner ID

```
findBySummonerId($summonerId);

```

ex.

```
use Devtemple\Laralol\Facades\League;

// You can get a challenger or master league for specified queue like this:
League::tier('chall')->queue('solo')->league()->get();

// Get league by league ID
League::findById($leagueId)->get();

// Find all leagues for specified summoner
League::findBySummonerId($summonerId)->get();

```

#### Lol Status

[](#lol-status)

Lol Status endpoint give you information about specified server. This endpoint don't have any specified functions.

ex.

```
use Devtemple\Laralol\Facades\LolStatus;

LolStatus::get();

```

#### Match

[](#match)

Match endpoint give you some data about matches and timelines for specific match. This endpoint have a some specified functions.

Options which you can use is:

- champion
- season
- queue
- beginIndex
- endIndex
- beginTime
- endTime

// Notice: Working with tournament code require specific policy for your API.

```
findByAccountId($accountId); // Receive matches for Account ID

findByMatchId($matchId); // Receive match for Match ID

findByTournamentCode($tournamentCode); // Receive matches by Tournament code

findByMatchIdAndTournamentCode($matchId, $tournamentCode); // Receive match by Match ID and Tournament code

timeline($matchId); // Receive timeline for specific Match ID

// With under function you can filter result you would get. How you can use it you can check in examples
season($season); // Data for specific users

champion($championId); // Data for specific champion ID

queue($queue); // Data for specific queue

beginIndex($beginIndex); // Start data from specific index

endIndex($endIndex); // End data for specific index

beginTime($beginTime); // Start data for specific date (You can define normal format, timestamp or carbon instance)

endTime($endTime); // End data for specific date (You can define normal format, timestamp or carbon instance)

or

options($options); // Array with specific options champion|season|queue|beginIndex|endIndex|beginTime|endTime

```

ex.

```
use Devtemple\Laralol\Facades\Match;

// Get matches for specific account ID
Match::findByAccountId($accountId)->get();

//  Get matches with specific functions options
Match::findByAccountId($accountId)
->season(10)
->beginIndex(10)
->endIndex(110)
->beginTime('12.01.2018' || $timestamp || Carbon::now()->subWeeks(12)) // Date between beginTime and endTime can't be more than one week
->endTime('15.01.2018' || $timestamp || Carbon::now()->subWeeks(12))
->get();

or

Match::findByAccountId($accountId)
->options([
    'season' => 10,
    'beginIndex' => 10,
    'endIndex' => 110
])
->get();

```

#### Spectator

[](#spectator)

Spectator endpoint give you some information about summoner if he is in game or give you featured games. You can take information with two specified functions.

This function return for you featured games:

```
featuredGames();

```

This function give you information if user is in game now:

```
findById($summonerId);

```

ex.

```
use Devtemple\Laralol\Facades\Spectator;

Spectator::featuredGames()->get();

or

Spectator::findById($summonerId)->get();

```

#### Summoner

[](#summoner)

Summoner endpoint let us get data about summoner like a account ID, summoner ID, name or icon ID. This endpoint has some functions which let us get awesome data from League of Legends API.

This functions let us get information about summoner:

```
findByName($name); // by his name

findByAccountId($id); // by his account id

findById($id); // by his ID

```

ex.

```
use Devtemple\Laralol\Facades\Summoner;

Summoner::findByName('Erring')->get();

or

Summoner::findByAccountId(29647586)->get();

or

Summoner::findById(25251096)->get();

```

#### Third Party Code

[](#third-party-code)

Third Party Code endpoint return for you third party code defined in the League of Legends Client. You can do this with one specified function.

This function give you third party code for specified summoner:

```
findById($summonerId);

```

ex.

```
use Devtemple\Laralol\Facades\ThirdPartyCode;

ThirdPartyCode::findById($summonerId)->get();

```

#### TOURNAMENT STUB

[](#tournament-stub)

This endpoint let you work with Tournament codes and tournament matches. This is a stub for testing and only working on **development** `LOL_API_KEY`. If you want know to options, go on lol api reference and check what you can use.

This function give you tournament stub data:

```
providers($options); // Creates a tournament provider and returns its ID

```

```
tournaments($options); // Creates a tournament and returns its ID.

```

```
postCodes($tournamentId, $options, $count); // Create a tournament code for the given tournament

```

```
getLobbyEvents($tournamentCode); // Gets a list of lobby events by tournament code

```

#### TOURNAMENT

[](#tournament)

This endpoint let you use all functions from tournament stub endpoint and extra few functions. You need to remember if you want use this endpoint, you need a `production` `LOL_API_KEY`.

Check some additional functions:

```
putCodes($tournamentCode); // Update the pick type, map, spectator type, or allowed summoners for a code

```

```
getCodes($tournamentCode); // Returns the tournament code DTO associated with a tournament code string

```

Built With
----------

[](#built-with)

- [Guzzle](http://docs.guzzlephp.org/en/stable/) - Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services.

Authors
-------

[](#authors)

- **Adrian Kuriata** - *Initial work* - [AdrianKuriata](https://github.com/AdrianKuriata)

See also the list of [contributors](https://github.com/AdrianKuriata/lara-lol/graphs/contributors) who participated in this project.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2808d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e9ccb8ca2f5be90c59bdd35f5e1de089395bc7924f60cf278a633cc33fd30c8b?d=identicon)[adriandj83](/maintainers/adriandj83)

---

Top Contributors

[![AdrianKuriata](https://avatars.githubusercontent.com/u/15891825?v=4)](https://github.com/AdrianKuriata "AdrianKuriata (43 commits)")

### Embed Badge

![Health badge](/badges/devtemple-lara-lol/health.svg)

```
[![Health](https://phpackages.com/badges/devtemple-lara-lol/health.svg)](https://phpackages.com/packages/devtemple-lara-lol)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k34](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1942.4k4](/packages/aimeos-prisma)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
