invoiceninja/app/Models/Invoice.php

31 lines
487 B
PHP
Raw Normal View History

<?php
namespace App\Models;
use App\Utils\Traits\MakesHash;
use Illuminate\Database\Eloquent\Model;
class Invoice extends BaseModel
{
use MakesHash;
protected $guarded = [
'id',
];
2019-04-04 10:17:15 +11:00
public function company()
{
2019-04-04 10:17:15 +11:00
return $this->belongsTo(Company::class);
}
2019-04-04 10:17:15 +11:00
public function user()
{
2019-04-04 10:17:15 +11:00
return $this->belongsTo(User::class);
}
2019-04-04 10:17:15 +11:00
public function invitations()
{
$this->morphMany(Invitation::class, 'inviteable');
}
}