Open MaximilianoHitter opened 8 months ago
got the same problem on Laravel 11
same issue with MySql 5.7.44 PHP 8.2 Laravel 11
same issue with Laravel 11.16.0 and MSSql
This might be because the shouldLogEvent
function in LogsActivity trait is returning false for created
and updated
events. Is this expected behavior?
if (! in_array($eventName, ['created', 'updated'])) {
return true;
}
@therajumandapati sorry for the delay, i havent been watching this post. I dont think that change in the implementation makes any effect, because the deleted event should keep working and when i try it again (a few months ago), goy back to the implementation that spatie recommends in the docs page. I already make some kind of "library" on my own to replicate the operation from activity logs (not all the methods and functions) to move over this.
Describe the bug Already installed activity log into a laravel 11 new proyect, use the same estructure like i used in a laravel 10 proyect, bue get no errors in laravel log and not even using x-debug.
To Reproduce Install package, generate the following trait
`<?php
namespace App\Models\Traits;
use Spatie\Activitylog\LogOptions;
trait LogsActivity { use \Spatie\Activitylog\Traits\LogsActivity;
} ` And add in models this trait
Expected behavior Get activity when create, update or delete model
Versions (please complete the following information)