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

Get specific version for diff #38

Open
borg1980 opened this issue Sep 21, 2018 · 1 comment
Open

Get specific version for diff #38

borg1980 opened this issue Sep 21, 2018 · 1 comment

Comments

@borg1980
Copy link

I think it's usable to have an method to return version based on version_id (not only current and previous) - somethimes we just need every change to our Model (step by step).

For example:

   /**
     * Returns version based on the version id
     * @return Version
     */
	public function getVersion($version_id)
    {
		$class = $this->getVersionClass();
		return $this->versions()->where("version_id", "=", $version_id)->first();
    }
@Peter-Krebs
Copy link

Is this different from Version::find( $version_id )?

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

2 participants