public function setModel($itemModel, $relations = [])
    {
        if (!class_exists($itemModel)) {
            throw new ModelNotFound('Could not find relation model');
        }

        $this->itemModel = $itemModel;
        $this->itemModelRelations = $relations;
    }
public function setModel($itemModel, $relations = [])
    {
        if (!class_exists($itemModel)) {
            throw new ModelNotFound('Could not find relation model');
        }

        $this->itemModel = $itemModel;
        $this->itemModelRelations = $relations;
    }
public function setModel ( $ itemModel , $ relations = [ ] ) { if ( ! class_exists ( $ itemModel ) ) { throw new ModelNotFound ( 'Could not find relation model' ) ; } $ this -> itemModel = $ itemModel ; $ this -> itemModelRelations = $ relations ; }
Sets the related model to the item.

@param $itemModel
@param array $relations

@throws ModelNotFound
Sets the related model to the item .