Marc Reichel

IGDB Laravel Wrapper

Laravel-Wrapper for the IGDB API (Apicalypse) including webhook handling.

Relationships (Extends)

To extend your result use the with-method:

use MarcReichel\IGDBLaravel\Models\Game;
 
$game = Game::with(['cover', 'artworks'])->get();

By default, every field (*) of the relationship is selected. If you want to define the fields of the relationship yourself you have to define the relationship as the array-key and the fields as an array:

use MarcReichel\IGDBLaravel\Models\Game;
 
$game = Game::with(['cover' => ['url', 'image_id']])->get();