1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/app/Models/Proposal.php

34 lines
541 B
PHP
Raw Normal View History

<?php
namespace App\Models;
use App\Utils\Traits\MakesHash;
use Illuminate\Database\Eloquent\Model;
class Proposal extends BaseModel
{
use MakesHash;
protected $guarded = [
'id',
];
protected $appends = ['proposal_id'];
public function getRouteKeyName()
{
return 'proposal_id';
}
public function getProposalIdAttribute()
{
return $this->encodePrimaryKey($this->id);
}
2019-04-28 07:31:32 +02:00
public function documents()
{
return $this->morphMany(Document::class, 'documentable');
}
}