mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
49 - Moving the Email to the Reservation
This commit is contained in:
@@ -56,13 +56,13 @@ class Concert extends Model
|
||||
return $this->createOrder($email, $tickets);
|
||||
}
|
||||
|
||||
public function reserveTickets($quantity)
|
||||
public function reserveTickets($quantity, $email)
|
||||
{
|
||||
$tickets = $this->findTickets($quantity)->each(function ($ticket) {
|
||||
$ticket->reserve();
|
||||
});
|
||||
|
||||
return new Reservation($tickets);
|
||||
return new Reservation($tickets, $email);
|
||||
}
|
||||
|
||||
public function findTickets($quantity)
|
||||
|
||||
Reference in New Issue
Block a user