Files
ticketbeast/app/Reservation.php
2016-12-08 13:49:42 -05:00

26 lines
377 B
PHP

<?php
namespace App;
class Reservation
{
private $tickets;
public function __construct($tickets)
{
$this->tickets = $tickets;
}
public function totalCost()
{
return $this->tickets->sum('price');
}
public function cancel()
{
foreach ($this->tickets as $ticket) {
$ticket->release();
}
}
}