Add project relationships across all entities
This commit is contained in:
parent
57e3b59b91
commit
c94c3fa373
2 changed files with 10 additions and 0 deletions
|
|
@ -152,6 +152,11 @@ class Credit extends BaseModel
|
|||
return $this->hasMany(CreditInvitation::class);
|
||||
}
|
||||
|
||||
public function project()
|
||||
{
|
||||
return $this->belongsTo(Project::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* The invoice which the credit has been created from.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -149,6 +149,11 @@ class Quote extends BaseModel
|
|||
return $this->belongsTo(User::class, 'assigned_user_id', 'id')->withTrashed();
|
||||
}
|
||||
|
||||
public function project()
|
||||
{
|
||||
return $this->belongsTo(Project::class)->withTrashed();
|
||||
}
|
||||
|
||||
public function invitations()
|
||||
{
|
||||
return $this->hasMany(QuoteInvitation::class);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue