diff --git a/app/Http/Transformers/AssetsTransformer.php b/app/Http/Transformers/AssetsTransformer.php index c76eb149dc..1f7974ed37 100644 --- a/app/Http/Transformers/AssetsTransformer.php +++ b/app/Http/Transformers/AssetsTransformer.php @@ -190,8 +190,8 @@ class AssetsTransformer 'email'=> ($asset->assigned->email) ? e($asset->assigned->email) : null, 'employee_number' => ($asset->assigned->employee_num) ? e($asset->assigned->employee_num) : null, 'type' => 'user', - 'eula_pdf' => e($asset->lastAcceptedLog->last()->filename), - 'signature_file' => e($asset->lastAcceptedLog->last()->accept_signature), + 'eula_pdf' => e($asset->acceptanceLog->last()->filename), + 'signature_file' => e($asset->acceptanceLog->last()->accept_signature), ] : null; } diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 4a8b168b7c..9f2f1c6af5 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -596,7 +596,7 @@ class Asset extends Depreciable * @since [v6.0.14] * @return \Illuminate\Database\Eloquent\Relations\Relation */ - public function lastAcceptedLog() + public function acceptanceLog() { return $this->hasMany(\App\Models\Actionlog::class, 'item_id') ->where('item_type', '=', self::class)