1
0
Fork 0
mirror of https://github.com/jimmybrancaccio/igdb-laravel.git synced 2026-06-04 12:24:45 -05:00
Simplify the integration of the IGDB API into your Laravel app. Including IGDB webhook support. https://marcreichel.dev/docs/igdb-laravel
Find a file
2026-06-04 12:23:00 -05:00
.github Fix CI matrix: remove PHP 8.2, add Laravel 13 job 2026-06-04 17:03:46 +00:00
config Add config to adjust the cache prefix 2025-03-30 13:31:16 +02:00
docs Add config to adjust the cache prefix 2025-03-30 13:31:16 +02:00
routes 🎨 Fix code style 2023-11-01 23:05:11 +01:00
src fix(website_category) Added Xbox, Playstation, Nintendo and Meta 2025-05-31 17:07:10 +01:00
tests Remove duplicate webhook route in tests 2026-06-04 11:23:32 -05:00
.gitignore PEST 2024-03-10 20:05:47 +01:00
composer.json Bump Rector lower bound 2026-06-04 11:21:38 -05:00
LICENSE chore: Update license date 2024-03-10 19:05:34 +01:00
phpstan-baseline.neon 💚 Fix PHPStan 2024-07-01 11:43:32 +02:00
phpstan.neon 💚 Fix PHPStan 2024-07-01 11:43:32 +02:00
phpunit.xml 🧹 Cleanup 2024-03-10 12:17:05 +01:00
pint.json ♻️ Refactor code 2023-11-01 23:02:05 +01:00
README.md Update README.md 2025-03-30 13:34:14 +02:00
rector.php ⬆️ Upgrade Dependencies 2025-01-24 19:34:21 +01:00

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

Cover

Basic installation

You can install this package via composer using:

composer require marcreichel/igdb-laravel

The package will automatically register its service provider.

To publish the config file to config/igdb.php run:

php artisan igdb:publish

This is the default content of the config file:

return [
    /*
     * These are the credentials you got from https://dev.twitch.tv/console/apps
     */
    'credentials' => [
        'client_id' => env('TWITCH_CLIENT_ID', ''),
        'client_secret' => env('TWITCH_CLIENT_SECRET', ''),
    ],

    /*
     * This package caches queries automatically (for 1 hour per default).
     * Here you can set how long each query should be cached (in seconds).
     *
     * To turn cache off set this value to 0
     */
    'cache_lifetime' => env('IGDB_CACHE_LIFETIME', 3600),
    
    /**
     * The prefix used to cache the results.
     *
     * E.g.: `[CACHE_PREFIX].75170fc230cd88f32e475ff4087f81d9`
     */
    'cache_prefix' => 'igdb_cache',

    /*
     * Path where the webhooks should be handled.
     */
    'webhook_path' => 'igdb-webhook/handle',

    /*
     * The webhook secret.
     *
     * This needs to be a string of your choice in order to use the webhook
     * functionality.
     */
    'webhook_secret' => env('IGDB_WEBHOOK_SECRET', null),
];

Documentation

You will find the full documentation on the dedicated documentation site.

Testing

Run the tests with:

composer test

Contribution

Pull requests are welcome :)