public function getEmptyValueForLocalKey(string $relation)
    {
        if ($this->isPolymorphic($relation)) {
            $key = $this->localForeignKeys[$relation];

            return [
                $key['type'] => null,
                $key['id']   => null,
            ];
        }

        if ($this->isManyRelationship($relation)) {
            return [];
        }
    }
public function getEmptyValueForLocalKey(string $relation)
    {
        if ($this->isPolymorphic($relation)) {
            $key = $this->localForeignKeys[$relation];

            return [
                $key['type'] => null,
                $key['id']   => null,
            ];
        }

        if ($this->isManyRelationship($relation)) {
            return [];
        }
    }
public function getEmptyValueForLocalKey ( string $ relation ) { if ( $ this -> isPolymorphic ( $ relation ) ) { $ key = $ this -> localForeignKeys [ $ relation ] ; return [ $ key [ 'type' ] => null , $ key [ 'id' ] => null , ] ; } if ( $ this -> isManyRelationship ( $ relation ) ) { return [ ] ; } }
Return empty value for a local foreign key.

@param string $relation

@return mixed
Return empty value for a local foreign key .