mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
af9ae06289
* Client Address * Vue components for address * Fix for null objects being passed to Vue * Copy Billing Address * route key * Social auth * Pad out route bindings * Deploy hashes across models * social auth buttons
33 lines
535 B
PHP
33 lines
535 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Utils\Traits\MakesHash;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Invoice extends BaseModel
|
|
{
|
|
use MakesHash;
|
|
|
|
protected $guarded = [
|
|
'id',
|
|
];
|
|
|
|
protected $appends = ['invoice_id'];
|
|
|
|
public function getRouteKeyName()
|
|
{
|
|
return 'invoice_id';
|
|
}
|
|
|
|
public function getInvoiceIdAttribute()
|
|
{
|
|
return $this->encodePrimaryKey($this->id);
|
|
}
|
|
|
|
public function invitations()
|
|
{
|
|
$this->morphMany(Invitation::class, 'inviteable');
|
|
}
|
|
}
|