6.8 - Reserving Individual Tickets

This commit is contained in:
Adam Wathan
2016-11-20 18:50:04 -05:00
parent 2b21f07aa2
commit c3c80722f5
6 changed files with 45 additions and 0 deletions

View File

@@ -56,6 +56,11 @@ class Concert extends Model
return $this->createOrder($email, $tickets);
}
public function reserveTickets($quantity)
{
return $this->findTickets($quantity);
}
public function findTickets($quantity)
{
$tickets = $this->tickets()->available()->take($quantity)->get();