'integer', 'session_id' => 'integer', 'category_id' => 'integer', 'metadata' => 'array', ]; } /** * Boot the model and prevent updates and deletes. */ protected static function booted(): void { self::updating(function (): bool { return false; }); self::deleting(function (): bool { return false; }); } /** * Get the user that performed the logged action. */ public function user(): BelongsTo { return $this->belongsTo(User::class); } /** * Get the session associated with this log entry. */ public function session(): BelongsTo { return $this->belongsTo(Session::class); } /** * Get the category associated with this log entry. */ public function category(): BelongsTo { return $this->belongsTo(Category::class); } }