setInvoiceID($invoiceID); $this->handle(); } private function setInvoiceID( $invoiceID ) { $this->invoiceID = $invoiceID; } private function handle() { $this->setPayments(); $this->setRemoveAllowed(); } private function setPayments() { $payments = Payment::whereInvoiceId($this->invoiceID); $this->payments = $payments->count() == 0 ? TRUE : FALSE; } private function setRemoveAllowed() { $this->removeAllowed = $this->payments; } }