Let’s skip the database and build the ability to like any model in Laravel, using Redis.
Traditionally you’d reach for the database for this kind of thing, but as you load more models and start performing checks within relationships — things begin to slow down.
With a key-value store like Redis, tracking users who have liked comments (or anything) keeps everything ridiculously fast.