activity-timeline
activity-timeline copied to clipboard
[Bug]: The package doesnt work with Relation::enforceMorphMap()
What happened?
When I'm using the Relation::enforceMorphMap()
method on the AppServiceProvider, the package doesn't work as expected. No result is returned on the activity page.
Relation::enforceMorphMap([
'user' => User::class,
]);
The query from that page is looks like this:
select * from `activity_log` where `subject_id` = 1 and `subject_type` = 'App\Models\User' order by `created_at` desc
It uses the class name instead of the morph map alias.
How to reproduce the bug
Use the Relation::enforceMorphMap() method on the AppServiceProvider
Package Version
^1.2
PHP Version
8.2.10
Laravel Version
^10.10
Which operating systems does with happen with?
No response
Notes
No response