Eloquence\Behaviours\Cacheable::key PHP Method

key() protected method

Returns the true key for a given field.
protected key ( string $field ) : mixed
$field string
return mixed
    protected function key($field)
    {
        if (method_exists($this->model, 'getTrueKey')) {
            return $this->model->getTrueKey($field);
        }
        return $field;
    }