Exemplo n.º 1
0
        return $this->belongsTo('App\\Models\\Account');
    }
    public function contact()
    {
        return $this->belongsTo('App\\Models\\Contact');
    }
    public function getAmount()
    {
        return Utils::formatMoney($this->amount, $this->client->currency_id);
    }
    public function getName()
    {
        return trim("payment {$this->transaction_reference}");
    }
    public function getEntityType()
    {
        return ENTITY_PAYMENT;
    }
}
Payment::created(function ($payment) {
    Activity::createPayment($payment);
});
Payment::updating(function ($payment) {
    Activity::updatePayment($payment);
});
Payment::deleting(function ($payment) {
    Activity::archivePayment($payment);
});
Payment::restoring(function ($payment) {
    Activity::restorePayment($payment);
});
Exemplo n.º 2
0
    }
    public function account_gateway()
    {
        return $this->belongsTo('App\\Models\\AccountGateway');
    }
    public function payment_type()
    {
        return $this->belongsTo('App\\Models\\PaymentType');
    }
    public function getRoute()
    {
        return "/payments/{$this->public_id}/edit";
    }
    public function getAmount()
    {
        return Utils::formatMoney($this->amount, $this->client->getCurrencyId());
    }
    public function getName()
    {
        return trim("payment {$this->transaction_reference}");
    }
    public function getEntityType()
    {
        return ENTITY_PAYMENT;
    }
}
Payment::creating(function ($payment) {
});
Payment::created(function ($payment) {
    event(new PaymentWasCreated($payment));
});