Hi all, I want my website visitor to be able to tell me by two simple button if some post are 'Usefull' or 'Useless', like thumbs.
I know some packages could do this with some lines of code but I also want with this system to learn some relationship tricks.
Only my post will be "rateable", so I think I don't need a polymorphic structure. https://9apps.ooo
What I have in mind: https://solitaire.onl/
Rate table with: a token cookie or an IP, or twice?? post_id rate (boolean: 1 = usefull, 0 = useless)
Rate model belongsTo Post Post model hasMany Rate
My question is: what is the best way to store "unique" visitor in my table? a token? the IP address of visitor? twice? something else? Maybe Laravel includes some magic tricks to catch "unique visitor which have already rate post"? https://bluestacks.vip/
I welcome any advice which could help me.