public function getRelationship($name)
    {
        // If relationship does not exist throw an exception
        if ( ! $this->isRelationship($name)) {
            $exception = new ModelNotFoundException();
            $exception->setModel($name);
            throw $exception;
        }

        return $this->relationships[$name];
    }
public function getRelationship($name)
    {
        // If relationship does not exist throw an exception
        if ( ! $this->isRelationship($name)) {
            $exception = new ModelNotFoundException();
            $exception->setModel($name);
            throw $exception;
        }

        return $this->relationships[$name];
    }
public function getRelationship ( $ name ) { // If relationship does not exist throw an exception if ( ! $ this -> isRelationship ( $ name ) ) { $ exception = new ModelNotFoundException ( ) ; $ exception -> setModel ( $ name ) ; throw $ exception ; } return $ this -> relationships [ $ name ] ; }
Return the relationship configurations.

@param string $name of related model

@throws Illuminate\Database\Eloquent\ModelNotFoundException

@return array
Return the relationship configurations .