public function getImage() { $imageId = $this->model->{$this->attribute}; if (!$imageId) { return null; } return StorageFile::findOne($imageId); }