WIP
This commit is contained in:
@@ -49,6 +49,12 @@ class Image extends Model implements HasThumbnail
|
||||
$this->save();
|
||||
}
|
||||
|
||||
public function makeCover() : void {
|
||||
Image::where('isCover', 1)->where('album_id', $this->album_id)->update(['isCover' => 0]);
|
||||
$this->isCover = true;
|
||||
$this->save();
|
||||
}
|
||||
|
||||
public function getLightboxAttribute() : array {
|
||||
return [
|
||||
'location' => route('image.lightbox', $this) . '?cacheBuster3000=' . $this->updated_at->timestamp,
|
||||
|
||||
Reference in New Issue
Block a user