protected function getDefaultAttributes(Model $model)
    {
        $defaults = [];

        if ($this->hasCreatedAtAttribute($model)) {
            $createdAt = $model->getCreatedAtColumn();
            $field = $this->fieldForAttribute($createdAt);
            $defaults[$field] = $this->extractAttribute($model, $createdAt, $field);
        }

        if ($this->hasUpdatedAtAttribute($model)) {
            $updatedAt = $model->getUpdatedAtColumn();
            $field = $this->fieldForAttribute($updatedAt);
            $defaults[$field] = $this->extractAttribute($model, $updatedAt, $field);
        }

        if ($this->hasDeletedAtAttribute($model)) {
            $deletedAt = $model->getDeletedAtColumn();
            $field = $this->fieldForAttribute($deletedAt);
            $defaults[$field] = $this->extractAttribute($model, $deletedAt, $field);
        }

        return $defaults;
    }
protected function getDefaultAttributes(Model $model)
    {
        $defaults = [];

        if ($this->hasCreatedAtAttribute($model)) {
            $createdAt = $model->getCreatedAtColumn();
            $field = $this->fieldForAttribute($createdAt);
            $defaults[$field] = $this->extractAttribute($model, $createdAt, $field);
        }

        if ($this->hasUpdatedAtAttribute($model)) {
            $updatedAt = $model->getUpdatedAtColumn();
            $field = $this->fieldForAttribute($updatedAt);
            $defaults[$field] = $this->extractAttribute($model, $updatedAt, $field);
        }

        if ($this->hasDeletedAtAttribute($model)) {
            $deletedAt = $model->getDeletedAtColumn();
            $field = $this->fieldForAttribute($deletedAt);
            $defaults[$field] = $this->extractAttribute($model, $deletedAt, $field);
        }

        return $defaults;
    }
protected function getDefaultAttributes ( Model $ model ) { $ defaults = [ ] ; if ( $ this -> hasCreatedAtAttribute ( $ model ) ) { $ createdAt = $ model -> getCreatedAtColumn ( ) ; $ field = $ this -> fieldForAttribute ( $ createdAt ) ; $ defaults [ $ field ] = $ this -> extractAttribute ( $ model , $ createdAt , $ field ) ; } if ( $ this -> hasUpdatedAtAttribute ( $ model ) ) { $ updatedAt = $ model -> getUpdatedAtColumn ( ) ; $ field = $ this -> fieldForAttribute ( $ updatedAt ) ; $ defaults [ $ field ] = $ this -> extractAttribute ( $ model , $ updatedAt , $ field ) ; } if ( $ this -> hasDeletedAtAttribute ( $ model ) ) { $ deletedAt = $ model -> getDeletedAtColumn ( ) ; $ field = $ this -> fieldForAttribute ( $ deletedAt ) ; $ defaults [ $ field ] = $ this -> extractAttribute ( $ model , $ deletedAt , $ field ) ; } return $ defaults ; }
Get attributes that are included for every model class.

@param Model $model
@return array
Get attributes that are included for every model class .