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

Getting single revision out of revisionHistory #20

Closed
mmodler opened this issue Aug 7, 2013 · 2 comments
Closed

Getting single revision out of revisionHistory #20

mmodler opened this issue Aug 7, 2013 · 2 comments

Comments

@mmodler
Copy link

mmodler commented Aug 7, 2013

Hi,

in my app i generate a list out with revisionHistory without oldValue and newValue to keep it clean.

I offer a revision details modal where i load the details with ajax. Is there a smarter way to load one revision by revision_id (with working relations) than this:

$revision = $modelfull::find($id)->revisionHistory->find($revision_id)

I think this is much overhead? If there is no better way perhaps you might consider this as a feature request :)

@duellsy
Copy link
Member

duellsy commented Aug 7, 2013

If you know the revision id, you can just use this to get its details:

$revision = \Venturecraft \Revisionable\Revision::find($revision_id);

@duellsy duellsy closed this as completed Aug 7, 2013
@mmodler
Copy link
Author

mmodler commented Aug 7, 2013

Yes, thanks! I remember i tried this and it was not working, but i think it was the namespaced models issue...

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