Key value pair editor.

Published 2 months ago by phpMick

Hi,

Has anyone done anything like this? I want the user to be able to enter key value pairs like name=test

Cheers,

Mick

Yorki
Yorki
2 months ago (34,640 XP)

Create you key value pair model with user_id and thats it.

class KeyValuePair extends Model
{
    protected $fillable = ['user_id', 'key', 'value'];
}

Database table would be:

table:
    - id
    - created_at
    - updated_at
    - user_id
    - key
    - value
phpMick

I was wondering more about the user interface, I was thinking maybe create a Vue component.

Yorki
Yorki
2 months ago (34,640 XP)

Yes you could make your CRUD controller for this and use it via vue. It's all up to you how will you display and edit that data cause it could be done in many ways.

phpMick

Yes, clearly it can be done in many ways. I was wondering if anyone had done anything similar.

Please sign in or create an account to participate in this conversation.