make sure causer models can have ulids #1233
Unanswered
TowlieeNetworks
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I found out while testing this package that with the user model i have i will never correctly store the id and thus the causer relation.
The user model uses the HasUlids and the event was caused by the following code
activity() ->causedBy(user()) ->performedOn(user()) ->event('login') ->log('The user has logged in.');
i have tested this with multiple different users and this is the output in the database.
id: 2
log_name: default
description: The user has logged in.
subject_type: App\Models\User
event: login
subject_id: 1
causer_type: App\Models\User
causer_id: 1
id: 3
log_name: default
description: The user has logged in.
subject_type: App\Models\User
event: login
subject_id: 1
causer_type: App\Models\User
causer_id: 1
id: 4
log_name: default
description: The user has logged in.
subject_type: App\Models\User
event: login
subject_id: 1
causer_type: App\Models\User
causer_id: 1
id: 5
log_name: default
description: The user has logged in.
subject_type: App\Models\User
event: login
subject_id: 1
causer_type: App\Models\User
causer_id: 1
Am i doing something wrong or is this just not supported yet?
Beta Was this translation helpful? Give feedback.
All reactions