Isswp101\Persimmon\Relationship\BelongsToRelationship::getOrFail PHP 메소드

getOrFail() 공개 메소드

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