fixed errors in event and tenant resources
This commit is contained in:
@@ -69,13 +69,13 @@ class EventPackage extends Model
|
||||
public function getRemainingPhotosAttribute(): int
|
||||
{
|
||||
$max = $this->package->max_photos ?? 0;
|
||||
return max(0, $this->max_photos - $this->used_photos);
|
||||
return max(0, $max - $this->used_photos);
|
||||
}
|
||||
|
||||
public function getRemainingGuestsAttribute(): int
|
||||
{
|
||||
$max = $this->package->max_guests ?? 0;
|
||||
return max(0, $this->max_guests - $this->used_guests);
|
||||
return max(0, $max - $this->used_guests);
|
||||
}
|
||||
|
||||
protected static function boot()
|
||||
|
||||
Reference in New Issue
Block a user