File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ No breaking changes. The only changes are to the development dependencies used f
17
17
18
18
## Changes
19
19
20
+ - Add config for which model to use in the ` RequestLog ` models ` user() ` relationship
21
+
20
22
### 3.2.0
21
23
22
24
- Add Laravel 11 compatibility
Original file line number Diff line number Diff line change 78
78
'Authorization ' ,
79
79
'filter.search ' ,
80
80
],
81
+
82
+ /*
83
+ |--------------------------------------------------------------------------
84
+ | User Model
85
+ |--------------------------------------------------------------------------
86
+ |
87
+ | This is the model used for user relationships.
88
+ | You can set a custom user model for relationships.
89
+ |
90
+ | Leaving this empty will use the model from the 'users' auth provider.
91
+ |
92
+ */
93
+ 'user_model ' => env ('REQUEST_LOGGER_USER_MODEL ' ),
81
94
];
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ class RequestLog extends Model implements RequestLoggerInterface
69
69
70
70
public function user (): BelongsTo
71
71
{
72
- return $ this ->belongsTo (config ('auth.providers.users.model ' ));
72
+ return $ this ->belongsTo (config ('request-logger.user_model ' ) ?? config ( ' auth.providers.users.model ' ));
73
73
}
74
74
75
75
public function team (): BelongsTo
You can’t perform that action at this time.
0 commit comments