mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-13 17:14:10 -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,
|
'email'=> ($asset->assigned->email) ? e($asset->assigned->email) : null,
|
||||||
'employee_number' => ($asset->assigned->employee_num) ? e($asset->assigned->employee_num) : null,
|
'employee_number' => ($asset->assigned->employee_num) ? e($asset->assigned->employee_num) : null,
|
||||||
'type' => 'user',
|
'type' => 'user',
|
||||||
'eula_pdf' => e($asset->lastAcceptedLog->last()->filename),
|
'eula_pdf' => e($asset->acceptanceLog->last()->filename),
|
||||||
'signature_file' => e($asset->lastAcceptedLog->last()->accept_signature),
|
'signature_file' => e($asset->acceptanceLog->last()->accept_signature),
|
||||||
] : null;
|
] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -596,7 +596,7 @@ class Asset extends Depreciable
|
||||||
* @since [v6.0.14]
|
* @since [v6.0.14]
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\Relation
|
* @return \Illuminate\Database\Eloquent\Relations\Relation
|
||||||
*/
|
*/
|
||||||
public function lastAcceptedLog()
|
public function acceptanceLog()
|
||||||
{
|
{
|
||||||
return $this->hasMany(\App\Models\Actionlog::class, 'item_id')
|
return $this->hasMany(\App\Models\Actionlog::class, 'item_id')
|
||||||
->where('item_type', '=', self::class)
|
->where('item_type', '=', self::class)
|
||||||
|
|
Loading…
Reference in a new issue