app/Models/Inventory.php
public function getRevisedMetricAttribute($id)
    {
        if ($id) {
            $metric = $this->metric()->find($id);

            if ($metric) {
                return $metric->name;
            }
        }

        return;
    }
public function getRevisedMetricAttribute($id)
    {
        if ($id) {
            $metric = $this->metric()->find($id);

            if ($metric) {
                return $metric->name;
            }
        }

        return;
    }
Retrieves the revised metric attribute.

@param int|string $id

@return null|string