protected function insertRelatedRecords($recordName, Model $record, $camelKey, $columnValue)
    {
        $relation = $record->$camelKey();

        if ($relation instanceof BelongsTo) {
            $this->insertBelongsTo($record, $relation, $columnValue);

            return;
        }

        if ($relation instanceof BelongsToMany) {
            $this->insertBelongsToMany($recordName, $relation, $columnValue);

            return;
        }
    }
protected function insertRelatedRecords($recordName, Model $record, $camelKey, $columnValue)
    {
        $relation = $record->$camelKey();

        if ($relation instanceof BelongsTo) {
            $this->insertBelongsTo($record, $relation, $columnValue);

            return;
        }

        if ($relation instanceof BelongsToMany) {
            $this->insertBelongsToMany($recordName, $relation, $columnValue);

            return;
        }
    }
protected function insertRelatedRecords ( $ recordName , Model $ record , $ camelKey , $ columnValue ) { $ relation = $ record -> $ camelKey ( ) ; if ( $ relation instanceof BelongsTo ) { $ this -> insertBelongsTo ( $ record , $ relation , $ columnValue ) ; return ; } if ( $ relation instanceof BelongsToMany ) { $ this -> insertBelongsToMany ( $ recordName , $ relation , $ columnValue ) ; return ; } }
Insert related records for a fixture.

@param  string $recordName
@param  Model $record
@param  string $camelKey
@param  string $columnValue
@return void
Insert related records for a fixture .