From 8cc367f9e60afe8978f589f0b99f89f72815c2de Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 19 Nov 2013 17:12:30 -0500 Subject: [PATCH] Get the admin user details --- app/models/Asset.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/models/Asset.php b/app/models/Asset.php index b81cb0c1fe..6c5413cb88 100644 --- a/app/models/Asset.php +++ b/app/models/Asset.php @@ -65,6 +65,14 @@ class Asset extends Elegant { return $this->hasMany('Actionlog','asset_id')->orderBy('added_on', 'desc'); } + /** + * Get action logs for this asset + */ + public function adminuser() + { + return $this->belongsTo('User','id'); + } + }