Replies: 1 comment 2 replies
-
Did you try audit-custom.html#example-related-attributes? Also take a look at #921 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have client model that have a pivot called patients which is connecting User model with the following code:
(this is the code that is in the client model)
public function patients() {
return $this->belongsToMany('App\Models\User' , 'client_patient' , 'client_id', 'patient_id')->withPivot('name', 'first_name', 'last_name', 'email', 'social_id', 'phone', 'age', 'dateOfBirth', 'address', 'city', 'gender', 'hmo', 'insurance', 'can_edit', 'verified', 'archive')->withTimestamps();
}
I want to know how can I add an audit on the pivot table each time that is been created or updated?
Help will be very appreciated
Beta Was this translation helpful? Give feedback.
All reactions