roundly-consulting/likes-for-laravel
A lightweight Laravel package for adding like and unlike functionality to Eloquent models. Supports polymorphic relationships, toggle helpers, like counts, and eager loading so you can build reactions, favorites, or upvotes with minimal setup.
Liked, Unliked, and ReactionChanged event classes plus the broadcasting configuration. These define the payload and channel behavior your application will consume.User like a Post, broadcast the Liked event on the post’s channel, and consume it in a queued listener or frontend Echo subscription. In 1.1.2 the payload should contain actor_type: "User" and likeable_type: "Post".likeable and actor relations rather than writing those columns directly.actor_type and likeable_type as serialized labels. After 1.1.2, compare against class_basename(User::class) and class_basename(Post::class), not FQCNs or morph-map aliases.ShouldQueue, broadcastOn, and broadcastAs.actor_type and likeable_type are now PHP class basenames (User, Post), not FQCNs (App\Models\User) and not morph-map aliases. Update any listener, frontend switch, analytics mapper, or test that asserted the old values.App\Models\User and Admin\Models\User both exist, both broadcast as User; the payload alone cannot distinguish them. Disambiguate through your own payload or channel context if that matters.$event->broadcastWith(). Assert basenames explicitly to catch regressions.^1.6 and tmpfs database legs—only affect contributors. Application upgrades should focus on event payload assertions and listener compatibility.How can I help you explore Laravel packages today?