lecturize/laravel-followers
Add follow/unfollow relationships to any Eloquent model in Laravel. Traits let models follow and be followed polymorphically, with helpers like follow(), unfollow(), toggleFollow(), isFollowing(), plus followers() and following() relations and query scopes.
CanFollow / CanBeFollowed traits. It decides the schema question (one generic followers table keyed by follower/followable morph pairs) so the team doesn't reinvent it, and defers everything above it to us.follow, unfollow, toggleFollow, isFollowing, followers, following) that a PM would otherwise have to spec, review, and QA.Adopt when most of these hold:
count() or a nightly rollup are acceptable; no timeline-fan-out at write time.Look elsewhere (or build in-house) when:
cybercog/laravel-love (follow + like + subscribe in one) or overtrue/laravel-follow before committing, and note none of them solve approvals or blocks either.To executives: A free, MIT-licensed building block that gives us the standard "who follows what" capability — the foundation for feeds, subscriptions, and audience targeting — without a build cycle or license cost. It removes a few days of undifferentiated work and, more importantly, settles a data-model decision we'd otherwise revisit on every adjacent feature. The trade-off is support: it's a small open-source project with a single maintainer and no release since early 2023, so we should treat it as code we adopt and own rather than a vendor we rely on. Ask: fund a named internal owner and a fork, not a support contract.
To engineering: Small surface area — a migration, a polymorphic pivot, two traits, and a handful of query helpers. Read it fully before adoption; it's forkable in a day. Three things to validate in a spike: (1) index and unique-constraint choices on the pivot for our read patterns, (2) how we want counters cached — the package won't do it, (3) Laravel version compatibility and whether we pin or vendor. Deliberately out of scope: follow approvals, blocks/mutes, feed generation, notifications. Keep the trait calls behind a thin domain service so replacing the package later is a swap, not a migration — the durable decision is the schema, not the library.
Recommendation: Adopt for MVP with a small spike and an internal fork; revisit if we add private accounts or high-traffic counters, either of which outgrows the package.
How can I help you explore Laravel packages today?