public function calculateTotal()
    {
        $total = $this->Subtotal = $this->Attendees()->leftJoin(
            'Broarm\EventTickets\Ticket',
            '`Broarm\EventTickets\Attendee`.`TicketID` = `Broarm\EventTickets\Ticket`.`ID`'
        )->sum('Price');

        // Calculate any price modifications if added
        if ($this->PriceModifiers()->exists()) {
            foreach ($this->PriceModifiers() as $priceModifier) {
                $priceModifier->updateTotal($total);
            }
        }

        return $this->Total = $total;
    }
public function calculateTotal()
    {
        $total = $this->Subtotal = $this->Attendees()->leftJoin(
            'Broarm\EventTickets\Ticket',
            '`Broarm\EventTickets\Attendee`.`TicketID` = `Broarm\EventTickets\Ticket`.`ID`'
        )->sum('Price');

        // Calculate any price modifications if added
        if ($this->PriceModifiers()->exists()) {
            foreach ($this->PriceModifiers() as $priceModifier) {
                $priceModifier->updateTotal($total);
            }
        }

        return $this->Total = $total;
    }
public function calculateTotal ( ) { $ total = $ this -> Subtotal = $ this -> Attendees ( ) -> leftJoin ( 'Broarm\EventTickets\Ticket' , '`Broarm\EventTickets\Attendee`.`TicketID` = `Broarm\EventTickets\Ticket`.`ID`' ) -> sum ( 'Price' ) ; // Calculate any price modifications if added if ( $ this -> PriceModifiers ( ) -> exists ( ) ) { foreach ( $ this -> PriceModifiers ( ) as $ priceModifier ) { $ priceModifier -> updateTotal ( $ total ) ; } } return $ this -> Total = $ total ; }
Get the total by querying the sum of attendee ticket prices

@return float
Get the total by querying the sum of attendee ticket prices