You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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;
public function getDescriptionForEvent(string $eventName): string
{
$arr = ['updated' => 'actualizado', 'created' => 'creado', 'deleted' => 'eliminado'];
$rta = $arr[$eventName];
return "Este modelo ha sido {$rta}";
}
public function getActivitylogOptions(): LogOptions
{
$config = LogOptions::defaults();
$config->logOnlyDirty();
$config->logExcept(['created_at', 'updated_at']);
$config->logOnly(['*']);
return $config;
}
}
`
And add in models this trait
Expected behavior
Get activity when create, update or delete model
Versions (please complete the following information)
PHP: 8.3.3
Database: MySQL 8.0
Laravel: 11.0.7
Package: spatie/activity-log
The text was updated successfully, but these errors were encountered:
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)
The text was updated successfully, but these errors were encountered: