creating like and dislike buttons using polymorphic relation

hi, i want to create a like and dislike buttons on a post, which save the status of the user in a likes table. it must be a polymorphic relationship and the controller must handle the like and dislike functionality well and also without using Ajax or any other frameworks..only laravel . i have : likes table ( id - user_id -likeable_type - likeable_id - like(0 or 1) the like status of 0 or 1 changes with like and dislike buttons .. thanks alot.

Sign in to participate in this thread!

We'd like to thank these amazing companies for supporting us