1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02:00
invoiceninja/app/Models/Payment.php
2019-04-28 15:31:32 +10:00

33 lines
543 B
PHP

<?php
namespace App\Models;
use App\Utils\Traits\MakesHash;
use Illuminate\Database\Eloquent\Model;
class Payment extends BaseModel
{
use MakesHash;
protected $guarded = [
'id',
];
protected $appends = ['payment_id'];
public function getRouteKeyName()
{
return 'payment_id';
}
public function getPaymentIdAttribute()
{
return $this->encodePrimaryKey($this->id);
}
public function documents()
{
return $this->morphMany(Document::class, 'documentable');
}
}