1. Go to this page and download the library: Download zenkilies/igdb-laravel library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zenkilies / igdb-laravel example snippets
return [
/*
* This is the API Token you got from https://api.igdb.com
*/
'api_token' => env('IGDB_TOKEN', ''),
/*
* 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),
/*
* This is the per-page limit for your tier.
*/
'per_page_limit' => 500,
/*
* This is the offset limit for your tier.
*/
'offset_limit' => 5000,
];
use MarcReichel\IGDBLaravel\Models\Game;
$games = Game::where('first_release_date', '>=', 1546297200)->get();
use MarcReichel\IGDBLaravel\Builder as IGDB;
$igdb = new IGDB('games'); // 'games' is the endpoint
$games = $igdb->get();