classes/Models/Element.php
protected function relatedModel()
    {
        $yaml = app('decoy.elements')->getConfig();
        $model = array_get($yaml, $this->key.'.class')
            ?: array_get($yaml, $this->key.',model.class');

        return $model::find($this->value);
    }
protected function relatedModel()
    {
        $yaml = app('decoy.elements')->getConfig();
        $model = array_get($yaml, $this->key.'.class')
            ?: array_get($yaml, $this->key.',model.class');

        return $model::find($this->value);
    }
protected function relatedModel ( ) { $ yaml = app ( 'decoy.elements' ) -> getConfig ( ) ; $ model = array_get ( $ yaml , $ this -> key . '.class' ) ? : array_get ( $ yaml , $ this -> key . ',model.class' ) ; return $ model :: find ( $ this -> value ) ; }
Get the model referenced in a "model" field

@return Model
Get the model referenced in a model field