Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport the enhancements to Pivot to 5.5 since it is LTS #25745

Closed
jimmypuckett opened this issue Sep 23, 2018 · 1 comment
Closed

Backport the enhancements to Pivot to 5.5 since it is LTS #25745

jimmypuckett opened this issue Sep 23, 2018 · 1 comment

Comments

@jimmypuckett
Copy link
Contributor

  • Laravel Version: 5.5.x (LTS)
  • PHP Version: >= 7
  • Database Driver & Version: mysql

Description:

We are having issues when a pivot model is used standalone to work with the pivot data. There is logic in the model that issues that it is only being used as a pivot. For example...

/**
  * Get the name of the "updated at" column.
  *
  * @return string
  */
  public function getUpdatedAtColumn()
  {
      return $this->pivotParent->getUpdatedAtColumn();
  }

However, as of 5.6, this bug was fixed..

 /**
    * Get the name of the "updated at" column.
    *
    * @return string
    */
    public function getUpdatedAtColumn()
    {
        return ($this->pivotParent)
                        ? $this->pivotParent->getUpdatedAtColumn()
                        : parent::getUpdatedAtColumn();
    }

Since 5.5 is LTS, can we get this model back ported into a 5.5 tag?

Steps To Reproduce:

  1. Make a pivot model
  2. Work directly with the model
@staudenmeir
Copy link
Contributor

Will be fixed in the next release (#25746).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants