User::class to getMorphClass()
dosan opened this issue · 1 comments
dosan commented
Hello!
It is correct to use 'getMorphClass' with an alias on the 'user_type' field of the History model, rather than directly specifying the '\App\User' class name.
history/src/HistoryObserver.php
Line 119 in bf2c637
I suggest
return static::getAuth()->check() ? static::getAuth()->user()->getMorphClass() : null;
Of course, some changes will be required in other files as well.
Thank you for your attention.
seancheung commented
Thanks! Pull requests are welcome!