1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
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 01:17:15 +02:00
public function company()
{
2019-04-04 01:17:15 +02:00
return $this->belongsTo(Company::class);
}
2019-04-04 01:17:15 +02:00
public function user()
{
2019-04-04 01:17:15 +02:00
return $this->belongsTo(User::class);
}
2019-04-04 01:17:15 +02:00
public function invitations()
{
$this->morphMany(Invitation::class, 'inviteable');
}
}