protected function collectForeignKeys()
    {
        $keys = [];

        foreach ($this->info->relations as $relation) {

            if ( ! in_array(
                $relation->type,
                [ RelationType::BELONGS_TO, RelationType::MORPH_TO, RelationType::BELONGS_TO_THROUGH ]
            )) {
                continue;
            }

            $keys = array_merge($keys, $relation->foreign_keys);
        }

        return $keys;
    }
protected function collectForeignKeys()
    {
        $keys = [];

        foreach ($this->info->relations as $relation) {

            if ( ! in_array(
                $relation->type,
                [ RelationType::BELONGS_TO, RelationType::MORPH_TO, RelationType::BELONGS_TO_THROUGH ]
            )) {
                continue;
            }

            $keys = array_merge($keys, $relation->foreign_keys);
        }

        return $keys;
    }
protected function collectForeignKeys ( ) { $ keys = [ ] ; foreach ( $ this -> info -> relations as $ relation ) { if ( ! in_array ( $ relation -> type , [ RelationType :: BELONGS_TO , RelationType :: MORPH_TO , RelationType :: BELONGS_TO_THROUGH ] ) ) { continue ; } $ keys = array_merge ( $ keys , $ relation -> foreign_keys ) ; } return $ keys ; }
Returns list of foreign key attribute names on this model.

@return string[]
Returns list of foreign key attribute names on this model .