Skip to content

Can we make it possible to store tags in seperate table? #665

Open
@niels-numbers

Description

@niels-numbers

| Bug? | no
| New Feature? |yes
| Framework | Laravel
| Framework version | 8.12
| Package version | 12.0
| PHP version | ^8.0

Actual Behaviour

Tags are stored in tags column of Audit Model

Expected Behaviour

I would like to be able to store tags in a seperate table, because when multiple tags are inside "tags" column filtering using SQL becomes very slow since one cannot use indexing.

Possible Solutions

Instead of directly calling create on the implementation at

return call_user_func([$implementation, 'create'], $model->toAudit());
one could use a UserCreate service that is called (just as we have the resolver services). In this service class, only the create method is called.

Thus the UserCreate service could be overwritten in the configs (just as the resolvers). People could then choose freely if they would like to store the tags in a different table inside their custom UserCreate service.

If you agree with this small change, I would like to create the MR.

Metadata

Metadata

Assignees

Labels

enhancementAn improvement or new feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions