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
Describe the bug
I've 2 database connections, One for the main application and other one is for activity logs. Adding data to activity logs table is working fine, but when I'm retreiving data from acvitivut logs table, It is showing the error base table or view secondary_database.users not found. How can I override the causer relation to mention the database connection. I don't want to mention database connection name in each model.
The text was updated successfully, but these errors were encountered:
I dont know but you can try to overwrite the model class method and force the connection to wished database
make a custom model that extends the model from package Spatie\Activitylog\Models and overwrite the relation method
Describe the bug
I've 2 database connections, One for the main application and other one is for activity logs. Adding data to activity logs table is working fine, but when I'm retreiving data from acvitivut logs table, It is showing the error
base table or view secondary_database.users not found
. How can I override thecauser
relation to mention the database connection. I don't want to mention database connection name in each model.The text was updated successfully, but these errors were encountered: