Logging model events
To log model events, simply add the LogsActivity
trait to your model.
use Javaabu\Activitylog\Traits\LogsActivity;
class Category extends Model {
use LogsActivity;
}
By default, this trait is configured to log all model attributes. It will not submit empty logs and a log is created only if an attribute value changes.