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

auditSync with multiple IDs #764

Open
protoapostoli opened this issue Feb 1, 2023 · 3 comments
Open

auditSync with multiple IDs #764

protoapostoli opened this issue Feb 1, 2023 · 3 comments

Comments

@protoapostoli
Copy link

Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 8.x.y
Package version 13
PHP version 8.1

Actual Behaviour

Empty audit values when using auditSync.

Expected Behaviour

I expected the system to loop through the resources to 'sync' all values from the relationship.

Steps to Reproduce

When I use auditSync('resources', $resources) it puts in a blank output into the DB. I have an array of IDs that I sync with. If I just pass one ID, it syncs fine, but if it's an array of IDs it turns up with blank values in the DB.

Here's my relationship.

    {
        return $this->belongsToMany(CalendarResource::class, 'bridge_events_resources')->withTimestamps();
    }

Possible Solutions

Possible solution, have the Auditing system loop through an array instead of just limiting it to one?

@parallels999
Copy link

Hi, feel free to make a PR to fix that, thanks

@adam-james-scg
Copy link

Is there any chance a fix for this can get prioritized? Still an issue with v13.6.4 as best I can tell. We have ours locked to v13.5.* in order to get correct audit logs.

@angeljqv
Copy link
Contributor

@adam-james-scg you can give it priority by making a "PR" with the fix, that would speed up everything

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

No branches or pull requests

5 participants