public function getRelationships()
    {
        if (empty(static::$relationHooks)) {
            $hooks = [];

            $rels = $this->getRelationshipsFromMethods(true);

            $this->getRelationshipsUnknownPolyMorph($rels, $hooks);

            $this->getRelationshipsKnownPolyMorph($rels, $hooks);

            $this->getRelationshipsHasOne($rels, $hooks);

            $this->getRelationshipsHasMany($rels, $hooks);

            static::$relationHooks = $hooks;
        }

        return static::$relationHooks;
    }
public function getRelationships()
    {
        if (empty(static::$relationHooks)) {
            $hooks = [];

            $rels = $this->getRelationshipsFromMethods(true);

            $this->getRelationshipsUnknownPolyMorph($rels, $hooks);

            $this->getRelationshipsKnownPolyMorph($rels, $hooks);

            $this->getRelationshipsHasOne($rels, $hooks);

            $this->getRelationshipsHasMany($rels, $hooks);

            static::$relationHooks = $hooks;
        }

        return static::$relationHooks;
    }
public function getRelationships ( ) { if ( empty ( static :: $ relationHooks ) ) { $ hooks = [ ] ; $ rels = $ this -> getRelationshipsFromMethods ( true ) ; $ this -> getRelationshipsUnknownPolyMorph ( $ rels , $ hooks ) ; $ this -> getRelationshipsKnownPolyMorph ( $ rels , $ hooks ) ; $ this -> getRelationshipsHasOne ( $ rels , $ hooks ) ; $ this -> getRelationshipsHasMany ( $ rels , $ hooks ) ; static :: $ relationHooks = $ hooks ; } return static :: $ relationHooks ; }
Get model's relationships.

@return array
Get model s relationships .