Search by

marcreichel / igdb-laravel

marcreichel

Eloquent-style models and query builder for the IGDB API in Laravel, with Twitch authentication and webhook support handled for you.

Package info

github.com/marcreichel/igdb-laravel

pkg:composer/marcreichel/igdb-laravel

Statistics

Installs: 186 192

Dependents: 0

Suggesters: 0

Stars: 114

Open Issues: 1


README

Laravel IGDB Wrapper

This is a Laravel wrapper for version 4 of the IGDB API (Apicalypse) including webhook handling.

Packagist Version Packagist Downloads Tests Pint PHPStan CodeFactor codecov License

Installation

Create a Twitch Developer App, then install the package via composer:

composer require marcreichel/igdb-laravel

Publish the config file to config/igdb.php and set your TWITCH_CLIENT_ID and TWITCH_CLIENT_SECRET:

php artisan igdb:publish

Example

use MarcReichel\IGDBLaravel\Models\Game;

$game = Game::where('name', 'Fortnite')->first();

Documentation

  1. Installation
  2. Getting started
  3. Select (Fields)
  4. Search
  5. Fuzzy Search
  6. Where clauses
  7. Ordering, Limit, & Offset
  8. Cache
  9. Relationships (Extends)
  10. Fetch results
  11. Reading properties
  12. Images
  13. Webhooks

Testing

Run the tests with:

composer test

Contribution

Pull requests are welcome :)