mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
86 - Deleting More Stale Code
This commit is contained in:
@@ -50,12 +50,6 @@ class Concert extends Model
|
||||
return $this->hasMany(Ticket::class);
|
||||
}
|
||||
|
||||
public function orderTickets($email, $ticketQuantity)
|
||||
{
|
||||
$tickets = $this->findTickets($ticketQuantity);
|
||||
return $this->createOrder($email, $tickets);
|
||||
}
|
||||
|
||||
public function reserveTickets($quantity, $email)
|
||||
{
|
||||
$tickets = $this->findTickets($quantity)->each(function ($ticket) {
|
||||
@@ -76,11 +70,6 @@ class Concert extends Model
|
||||
return $tickets;
|
||||
}
|
||||
|
||||
public function createOrder($email, $tickets)
|
||||
{
|
||||
return Order::forTickets($tickets, $email, $tickets->sum('price'));
|
||||
}
|
||||
|
||||
public function addTickets($quantity)
|
||||
{
|
||||
foreach (range(1, $quantity) as $i) {
|
||||
|
||||
Reference in New Issue
Block a user