belongsTo('Asset','asset_id')->withTrashed(); } public function adminlog() { return $this->belongsTo('User','user_id'); } public function userlog() { return $this->belongsTo('User','checkedout_to'); } /** * Get the parent category name */ public function logaction($actiontype) { $this->action_type = $actiontype; if($this->save()) { return true; } else { return false; } } }