diff --git a/app/Models/Credit.php b/app/Models/Credit.php index 8f942d0ea15b..aecb446a18a5 100644 --- a/app/Models/Credit.php +++ b/app/Models/Credit.php @@ -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. */ diff --git a/app/Models/Quote.php b/app/Models/Quote.php index d23451290ffd..9038c6ef3b62 100644 --- a/app/Models/Quote.php +++ b/app/Models/Quote.php @@ -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);