WIP
This commit is contained in:
@@ -28,6 +28,14 @@ class Album extends Model
|
||||
return $this->images;
|
||||
}
|
||||
|
||||
public function getHasCoverAttribute() : bool {
|
||||
return $this->images()->where('isCover', 1)->count() > 0;
|
||||
}
|
||||
|
||||
public function getHasProcessingMediaAttribute() : bool {
|
||||
return $this->images()->where('isProcessing', 1)->count() > 0;
|
||||
}
|
||||
|
||||
public function getThumbnailAttribute() : ?string {
|
||||
return $this->images()->where('isCover', 1)->first()?->getThumbnail();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user