model(Image::class)->create($data); } public function listImages(array $data = []): \Generator { return $this->model(Image::class)->enumerate($this->api->getImages(), $data); } /** * @param null $id */ public function getImage($id = null): Image { $image = $this->model(Image::class); $image->populateFromArray(['id' => $id]); return $image; } }