mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
51 - Green with Feature Envy
This commit is contained in:
@@ -22,18 +22,6 @@ class Order extends Model
|
||||
return $order;
|
||||
}
|
||||
|
||||
public static function fromReservation($reservation)
|
||||
{
|
||||
$order = self::create([
|
||||
'email' => $reservation->email(),
|
||||
'amount' => $reservation->totalCost(),
|
||||
]);
|
||||
|
||||
$order->tickets()->saveMany($reservation->tickets());
|
||||
|
||||
return $order;
|
||||
}
|
||||
|
||||
public function concert()
|
||||
{
|
||||
return $this->belongsTo(Concert::class);
|
||||
|
||||
Reference in New Issue
Block a user