When I try to use function getUrl() I get the error message Call to a member function getUrl() on array;
GamesController:
use MarcReichel\IGDBLaravel\Models\Game;
$games = Game::select(["*"])->with(['cover'])->get();
return GamesResource::collection($games);
GamesResource:
use MarcReichel\IGDBLaravel\Enums\Image\Size;
public function toArray(Request $request): array
{
return [
'cover' => $this->cover->getUrl(Size::COVER_BIG),
];
}
When I try to use function getUrl() I get the error message Call to a member function getUrl() on array;
GamesController:
GamesResource: