You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there anyway to support multi auth? The problem is that a model can be edited by the user and the staff as well. However, just by the id, it's not possible to track who actually edited it.
Is it possible to event return the id of the Revision model in the event listening?
I checked it and it doesn't return the id of the Revision (revision id from revisions table)
I tried tracking the event like this.
Event::listen('revisionable.*', function ($model, $revisions) {
// Do something with the revisions or the changed model.
// Log::info(json_encode($revisions)); // couldn't get the Revision model id here
});
If I can just get to know the revision id, I can update the table manually with something like this
if (Auth::check()) {
$revisionId = 'id here';
Revision::where('id', $revisionId)->update('user_type' => Auth::user() instance of User ? 'user' : 'staff');
}
Please let me know if it's possible to get the id in the revision event. That would be do my work. Thank you very much in advance.
The text was updated successfully, but these errors were encountered:
Would firstly work for any situation. Secondly it would allow for a eager loadable relation, which is currently not the case.
A timeline would need to do n+1 queries to list who did what. Which I think is not desired.
This would be a breaking change. But I do think one for the better.
Hi, thank you for such a wonderful package. Definitely made life a lot easier.
I've multiple auth in my application.
Is there anyway to support multi auth? The problem is that a model can be edited by the user and the staff as well. However, just by the id, it's not possible to track who actually edited it.
Is it possible to event return the id of the
Revision
model in the event listening?I checked it and it doesn't return the id of the
Revision
(revision id from revisions table)I tried tracking the event like this.
If I can just get to know the revision id, I can update the table manually with something like this
Please let me know if it's possible to get the id in the revision event. That would be do my work. Thank you very much in advance.
The text was updated successfully, but these errors were encountered: