K
K
knowledge2018-05-26 13:44:03
Laravel
knowledge, 2018-05-26 13:44:03

How to pass the id of the user who performed the action when synchronizing models in laravel?

The many-to-many relationship, users and roles, are established via sync()
But I would also have the user_id field in the intermediate table and write to it the id of the administrator who set the roles to the user
How is this done?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question