PHPackages                             avolle/fotballdata - 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. avolle/fotballdata

ActiveLibrary[API Development](/categories/api)

avolle/fotballdata
==================

A package for fetching data from Norwegian Football API service Fotballdata

1.1.0(1y ago)029[1 PRs](https://github.com/mentisy/fotballdata/pulls)MITPHPPHP ^8.1CI failing

Since Jul 3Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/mentisy/fotballdata)[ Packagist](https://packagist.org/packages/avolle/fotballdata)[ RSS](/packages/avolle-fotballdata/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (6)Versions (9)Used By (0)

Fotballdata SDK for PHP
=======================

[](#fotballdata-sdk-for-php)

[![codecov](https://camo.githubusercontent.com/c5b813f8485ce029ef44e8af45c707550d72fb3e468bc50764ad7016b02434a4/68747470733a2f2f636f6465636f762e696f2f67682f6d656e746973792f666f7462616c6c646174612f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d66484479534573656457)](https://codecov.io/gh/mentisy/fotballdata)[![GitHub](https://camo.githubusercontent.com/f26fb9947c4f4f5850b218e50e73bf0488359b0a8ba016bd492553bf1bc681ec/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d656e746973792f666f7462616c6c64617461)](https://github.com/mentisy/fotballdata/blob/main/LICENSE)[![PHP Version Require](https://camo.githubusercontent.com/38b3cee1bef3916eb8841df00d33db66d7ab55a42ff4d56d7d2c22840511b83e/687474703a2f2f706f7365722e707567782e6f72672f61766f6c6c652f666f7462616c6c646174612f726571756972652f706870)](https://packagist.org/packages/avolle/fotballdata)

A library for fetching data from [Norwegian Football API service Fotballdata](https://www.fotballdata.no/).

### Installation:

[](#installation)

`composer install avolle/fotballdata`

### Supports:

[](#supports)

- PHP 8.1
- PHP 8.2
- PHP 8.3

### Gotchas

[](#gotchas)

As `match` is a [protected control structure token](https://www.php.net/manual/en/control-structures.match.php)for PHP from version 8.0 and up, we need to alias the `Match` entity. Therefore all Match results use the `Game` entity. Only the entity name is aliased. Requests and hasMany relationships continue to use `Matches`.

### Usage:

[](#usage)

Anywhere in your code:

```
