mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-12 16:44:08 -08:00
Changed the method name, since it will return an entire collection
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
46e17f7e77
commit
adec86f1ef
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue