Closed pirmax closed 1 year ago
@pirmax
I've added the missing cast to the cover object.
The fix is released in version 3.8.1.
Please update and check again. If it's not working then please let me know here.
Hi I'm on 3.8.1 and I'm also getting an array with ->cover
$game = Game::where('name', 'Fortnite')->with(['cover'])->first();
dd($game->cover);
array:9 [▼ // app/Actions/Home.php:26
"id" => 112205
"alpha_channel" => false
"animated" => false
"game" => 1905
"height" => 800
"image_id" => "co2ekt"
"url" => "//images.igdb.com/igdb/image/upload/t_thumb/co2ekt.jpg"
"width" => 600
"checksum" => "c75e6a90-832c-6d15-8839-6732f415cabe"
]
@captenmasin Fixed with version 4.0.0. It's a major release, because the minimum PHP version is bumped to PHP 8.1.
Please update to that release and check again.
Aaay it's working! Very nice, much appreciated
Hey,
The following code (presented on docs) :
The cover attribute is an array and not an object to use getUrl() method...
What did I do wrong? Thanks.