mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
128 - Making the Progress Bar Work
This commit is contained in:
@@ -104,4 +104,14 @@ class Concert extends Model
|
||||
{
|
||||
return $this->tickets()->sold()->count();
|
||||
}
|
||||
|
||||
public function totalTickets()
|
||||
{
|
||||
return $this->tickets()->count();
|
||||
}
|
||||
|
||||
public function percentSoldOut()
|
||||
{
|
||||
return number_format(($this->ticketsSold() / $this->totalTickets()) * 100, 2);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user