6.1 - Uncovering a New Domain Object

This commit is contained in:
Adam Wathan
2016-11-18 18:35:08 -05:00
parent 510a60fcd3
commit 12d91dab85
3 changed files with 45 additions and 2 deletions

18
app/Reservation.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
namespace App;
class Reservation
{
private $tickets;
public function __construct($tickets)
{
$this->tickets = $tickets;
}
public function totalCost()
{
return $this->tickets->sum('price');
}
}