Isswp101\Persimmon\Relationship\BelongsToRelationship::getOrFail PHP Method

getOrFail() public method

Return parent model.
public getOrFail ( ) : ElasticsearchModel
return Isswp101\Persimmon\ElasticsearchModel
    public function getOrFail()
    {
        $model = $this->get();
        if (is_null($model)) {
            throw new ParentModelNotFoundException($this->parentClass, $this->child->getParentId());
        }
        return $model;
    }