1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/Models/Proposal.php
2019-04-28 15:31:32 +10:00

34 lines
541 B
PHP

<?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);
}
public function documents()
{
return $this->morphMany(Document::class, 'documentable');
}
}