Add history and activities relations'
This commit is contained in:
parent
438cf2d3ee
commit
9f9bcb0fce
1 changed files with 10 additions and 0 deletions
|
|
@ -157,6 +157,16 @@ class RecurringInvoice extends BaseModel
|
|||
return $value;
|
||||
}
|
||||
|
||||
public function activities()
|
||||
{
|
||||
return $this->hasMany(Activity::class)->orderBy('id', 'DESC')->take(300);
|
||||
}
|
||||
|
||||
public function history()
|
||||
{
|
||||
return $this->hasManyThrough(Backup::class, Activity::class);
|
||||
}
|
||||
|
||||
public function company()
|
||||
{
|
||||
return $this->belongsTo(Company::class);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue