Fixes for history on activity transformer
This commit is contained in:
parent
ff130ae8a2
commit
5454c931e6
2 changed files with 8 additions and 1 deletions
|
|
@ -122,6 +122,13 @@ class Activity extends StaticModel
|
|||
return $this->hasOne(Backup::class);
|
||||
}
|
||||
|
||||
|
||||
public function history()
|
||||
{
|
||||
return $this->hasOne(Backup::class);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class ActivityTransformer extends EntityTransformer
|
|||
|
||||
public function includeHistory(Activity $activity)
|
||||
{
|
||||
$transformer = new ActivityTransformer($this->serializer);
|
||||
$transformer = new InvoiceHistoryTransformer($this->serializer);
|
||||
|
||||
return $this->includeItem($activity->backup, $transformer, Backup::class);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue