spatie / laravel-activitylog

Log activity inside your Laravel app

Home Page:https://docs.spatie.be/laravel-activitylog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

updateOrCreate() does not log anything

DePalmo opened this issue · comments

Describe the bug
I have a model and a related model. When creating additional related models with updateOrCreate, it does not log anything.

To Reproduce
$model->relatedModel()->create($attributes) work well.
$model->relatedModel()->updateOrCreate($attributes) does not log anything.

Expected behavior
Well, I expect that updateOrCreate() would also create a log entry. Either that the element was updated or created.

Versions (please complete the following information)

  • PHP: 8.1.2
  • Database: MySQL 10.4.13-MariaDB / MariaDB 10.11.5+maria~ubu2004
  • Laravel: 10.26.2
  • Package: 4.7.3

Exception
None.

Stack Trace
n/a

Found an issue with my code, my apologies for submitting a false bug.