fix photo module

This commit is contained in:
2024-11-29 14:07:55 +03:00
parent 3ef1e7d7e0
commit 0ed97877fd
3 changed files with 46 additions and 1 deletions

View File

@ -31,4 +31,10 @@ class PhotoService
return false;
}
public static function getByEntity(string $entity, int $entity_id): string
{
$photo = Photo::where("entity", $entity)->where("entity_id", $entity_id)->first();
return $photo->image ?? "";
}
}