VETO87's avatar

(Add shortcut) function for users.

Hello In my dashboard there's shortcut button https://prnt.sc/26lxi42 <--image I want to let any staff add his own shortcuts but what I'm not sure about is how to save each user shortcut? Should I make new table with Shortcuts name and add foreign key Colum for users or is there better way?

Thank you :)

0 likes
3 replies
Sinnbeck's avatar

Yeah that sounds like a fine plan. Just be sure to validate it to make sure it's a valid url and you should be fine

Snapey's avatar

Each user has potentially many shortcuts, so you need a table with a one to many relationship with user

tykus's avatar

If you have a prescribed list of available shortcuts, then a Shortcut model (and table) along with a many-to-many relationship to the User model would work. This would give you some control over (i) the available shortcuts and (ii) the icon / how the shortcut link/button is presented

Please or to participate in this conversation.