Add project relationships across all entities

This commit is contained in:
= 2021-02-27 08:37:56 +11:00
parent 57e3b59b91
commit c94c3fa373
2 changed files with 10 additions and 0 deletions

View File

@ -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.
*/

View File

@ -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);