2020-08-25 15:06:38 +02:00
|
|
|
<?php
|
|
|
|
/**
|
2020-09-06 11:38:10 +02:00
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
2020-08-25 15:06:38 +02:00
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @license https://opensource.org/licenses/AAL
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
class PaymentHash extends Model
|
|
|
|
{
|
2020-09-06 11:38:10 +02:00
|
|
|
protected $guarded = ['id'];
|
2020-08-30 14:00:19 +02:00
|
|
|
|
2020-08-25 15:06:38 +02:00
|
|
|
protected $casts = [
|
2020-09-06 11:38:10 +02:00
|
|
|
'data' => 'object',
|
2020-08-25 15:06:38 +02:00
|
|
|
];
|
|
|
|
|
2020-10-22 15:24:18 +02:00
|
|
|
|
2020-08-25 15:06:38 +02:00
|
|
|
public function invoices()
|
|
|
|
{
|
2020-10-22 15:24:18 +02:00
|
|
|
return $this->data->invoices;
|
2020-08-25 15:06:38 +02:00
|
|
|
}
|
2020-10-13 14:28:30 +02:00
|
|
|
|
|
|
|
public function payment()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Payment::class)->withTrashed();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function fee_invoice()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Invoice::class, 'fee_invoice_id', 'id');
|
|
|
|
}
|
2020-08-25 15:06:38 +02:00
|
|
|
}
|