protected function fill()
    {
        $this->primaryKeys = $this->blueprint->primaryKey();

        // Process columns
        foreach ($this->blueprint->columns() as $column) {
            $this->parseColumn($column);
        }

        if (! $this->loadRelations) {
            return;
        }

        foreach ($this->blueprint->relations() as $relation) {
            $model = $this->makeRelationModel($relation);
            $belongsTo = new BelongsTo($relation, $this, $model);
            $this->relations[$belongsTo->name()] = $belongsTo;
        }

        foreach ($this->factory->referencing($this) as $related) {
            $factory = new ReferenceFactory($related, $this);
            $references = $factory->make();
            foreach ($references as $reference) {
                $this->relations[$reference->name()] = $reference;
            }
        }
    }
protected function fill()
    {
        $this->primaryKeys = $this->blueprint->primaryKey();

        // Process columns
        foreach ($this->blueprint->columns() as $column) {
            $this->parseColumn($column);
        }

        if (! $this->loadRelations) {
            return;
        }

        foreach ($this->blueprint->relations() as $relation) {
            $model = $this->makeRelationModel($relation);
            $belongsTo = new BelongsTo($relation, $this, $model);
            $this->relations[$belongsTo->name()] = $belongsTo;
        }

        foreach ($this->factory->referencing($this) as $related) {
            $factory = new ReferenceFactory($related, $this);
            $references = $factory->make();
            foreach ($references as $reference) {
                $this->relations[$reference->name()] = $reference;
            }
        }
    }
protected function fill ( ) { $ this -> primaryKeys = $ this -> blueprint -> primaryKey ( ) ; // Process columns foreach ( $ this -> blueprint -> columns ( ) as $ column ) { $ this -> parseColumn ( $ column ) ; } if ( ! $ this -> loadRelations ) { return ; } foreach ( $ this -> blueprint -> relations ( ) as $ relation ) { $ model = $ this -> makeRelationModel ( $ relation ) ; $ belongsTo = new BelongsTo ( $ relation , $ this , $ model ) ; $ this -> relations [ $ belongsTo -> name ( ) ] = $ belongsTo ; } foreach ( $ this -> factory -> referencing ( $ this ) as $ related ) { $ factory = new ReferenceFactory ( $ related , $ this ) ; $ references = $ factory -> make ( ) ; foreach ( $ references as $ reference ) { $ this -> relations [ $ reference -> name ( ) ] = $ reference ; } } }
Parses the model information.
Parses the model information .