Isswp101\Persimmon\Relationship\BelongsToRelationship::getOrFail PHP Méthode

getOrFail() public méthode

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