Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Teamwork Laravel Package

mpociot/teamwork

Teamwork is a Laravel package for adding teams, members, and user invitations to your app. Attach teams to any model with a simple trait, manage memberships and roles, and send email invitations with acceptance flows—without reinventing team management.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • mpociot/teamwork is a thin, opinionated Eloquent package: it ships teams, team_members (pivot-ish) and invitations migrations, a Team model, an Invitation model, a HasTeams trait applied to the host User, and a small service/facade for invite → accept → attach flows.
  • It does not own the user table, does not impose a UI, and does not register middleware or routes. That is a good architectural profile: additive schema, trait-based opt-in, and no framework-level interception. A TPM can scope it as "schema + domain helper," not "auth subsystem."
  • The gap is that team membership is now a solved primitive in the Laravel ecosystem. Laravel Jetstream ships teams (with switching, invitations, roles) out of the box; spatie/laravel-permission covers the roles/permissions axis that Teamwork deliberately leaves to you. Any evaluation has to justify building on a narrow package instead of a maintained first-party or de-facto-standard one.
  • Role handling is thin — membership exists, authorization does not. Expect to pair it with a permission package or hand-roll a role column check, which means the "team" concept is split across two libraries with no shared contract.

Integration feasibility

  • On its native target (Laravel 5.x, PHP 5.6/7.0-era), installation is composer require + vendor:publish + trait on User. A day of work end to end, including invitations.
  • On Laravel 8+ the honest answer is: it does not install cleanly. Composer constraints cap the illuminate/* range, the service provider and facade predate the modern package-discovery conventions in some spots, and PHP 8 will surface signature and nullability issues in the trait and models. The realistic path is vendoring/forking, not requiring.
  • The API surface is small enough that a fork is tractable — this is the single biggest point in its favor. Roughly a dozen classes and three migrations.
  • Note the metadata inconsistency: a "last release" of 2026-09-03 is not credible for a package built against Laravel 5. Combined with 0 dependents and a 28.9 composite score, treat the release date as a registry artifact and verify tags, commit cadence, and open-issue triage directly on the repository before any planning assumption rests on it.

Technical risk

  • Abandonment risk is the dominant risk. Low opportunity score, zero dependents, no downstream pressure to keep it compatible. No one else is paying the maintenance tax, so we would be the only ones.
  • Auth-adjacent security surface. Invitations imply tokens, expiry, email binding, and acceptance endpoints. If we build accept-invite on top of this package we inherit responsibility for token generation, single-use enforcement, and replay protection — the package gives structure, not guarantees.
  • Schema ownership cost. Three tables land in our database under the package's naming. Replacing the package later means a data migration off team_members/invitations, not just a code swap.
  • Mass-assignment and escalation. Membership roles stored as a plain column with fillable guards are a classic privilege-escalation foot-gun; audit $fillable before exposing any team-management endpoint.

Key questions

  1. Do we actually need invitations, or only membership + roles? If it's membership only, this package is ~150 lines of our own code and the dependency is unjustified.
  2. What Laravel and PHP versions are in scope today and in 12 months? If the answer is 10/11/12, this is a fork decision, not an adoption decision.
  3. Who owns the fork — named engineer, named team, funded maintenance window?
  4. Is multi-tenancy in scope (one user, many teams, tenant-scoped data)? Teamwork gives the association but no scoping primitive.
  5. Does Jetstream or an internal Membership model already exist in the codebase, and are we about to create a second source of truth?

Integration Approach

Stack fit

  • Strong fit only for Laravel 5.5–6.x applications with a conventional App\User and no existing team concept. In that context it is genuinely faster than writing it.
  • Weak-to-negative fit for Laravel 9+ or any app already on Jetstream, Breeze-with-teams, or a custom Organization/Membership model. Two team models in one schema is a permanent reconciliation cost.

Migration path

  • Preferred: fork to an internal namespace (acme/teamwork) with the upstream MIT license retained, bump illuminate/* constraints, add PHP 8 type fixes, and treat the fork as first-party code. Budget 3–5 engineer-days for the upgrade plus test coverage.
  • Alternative: absorb, don't depend. Copy the trait and migrations into the app, delete the package, keep the table names. Removes the supply-chain and abandonment risk entirely at roughly the same effort as the fork, with no ongoing sync burden.
  • Explicit non-path: pinning the upstream package and hoping. With 0 dependents there is no community pressure to patch a CVE or a Laravel compatibility break.

Compatibility

  • Verify the Laravel/PHP constraint matrix in composer.json against our target versions before anything else — this single check usually decides the approach.
  • Check migration portability across MySQL and Postgres (index naming, foreign-key cascade behavior on user delete). Teamwork-era migrations frequently lack explicit onDelete('cascade').
  • Verify the trait's interaction with our existing User model: any conflicting methods (teams(), ownedTeams(), currentTeam()) will collide silently.

Sequencing

  1. Spike (2 days): install the fork on a branch, run migrations against a schema dump of production, exercise invite/accept/leave in a test app. Confirm the trait doesn't collide with User.
  2. Decision gate: if the spike takes more than ~3 days, switch to "absorb the code" or "adopt Jetstream teams."
  3. Fork + CI (1 week): internal package, matrix tests across our supported Laravel/PHP versions, static analysis.
  4. Adapter layer: wrap invitation/acceptance in our own service so the package is never called directly from controllers. This is the escape hatch for a later replacement.
  5. Feature build: roles, authorization policies, team switching.
  6. Document the exit: a one-page note on how to migrate off the fork, written before launch, not after.

Operational Impact

Maintenance

  • Effective maintenance burden is 100% ours. Upstream is a reference implementation, not a supported dependency. Plan for a recurring cost at each Laravel major upgrade — modest (small surface) but non-zero and unbounded in time.
  • Abandoned-package exposure: transitive dev dependencies and any future security advisory against the pinned version will have no upstream fix. Mitigate with the fork and a periodic composer audit.

Support

  • Community-only: GitHub issues with no triage guarantee. 1,100 stars reflects 2016-era interest, not current health. There is no vendor to escalate to and no commercial backing.
  • Internal support model must be explicit: name an owning team, add the fork to the on-call runbook, and document the invitation flow's failure cases for support staff.

Scaling

  • Data volume is trivial: one row per membership, one per invitation. Index team_members.user_id, team_members.team_id (composite unique on the pair), and invitations.token / invitations.email.
  • Read-path risk is N+1, not throughput: naive $user->teams inside a loop will fan out. Enforce eager loading in code review or add a query scope.
  • Invitation acceptance is a low-QPS, write-heavy path; no queueing or caching concerns. No horizontal scaling implications.

Failure modes

  • Orphaned memberships on user deletion if foreign keys lack cascade — surfaces as ghost members in team listings and skewed permission checks.
  • Duplicate membership from concurrent accept-invite requests; requires a unique constraint, not just an application check.
  • Invitation token leakage/replay if tokens are stored in plaintext and not expired or single-used.
  • Role escalation via unfiltered mass assignment on the membership model.
  • Schema collision if a teams table already exists or is later introduced by another package/feature — the migration will fail loudly or, worse, silently adopt the wrong table.
  • Upgrade cliff: the framework bump that breaks the package will block the whole application upgrade, converting a routine maintenance task into an incident.

Ramp-up

  • Engineer ramp-up is genuinely low: small, readable codebase, well-known Laravel idioms. A mid-level developer is productive in under a day.
  • Organizational ramp-up is the real cost: the fork needs an owner, a release process, and a documented exit path. That is the part that gets skipped and then regretted.
  • Recommendation to carry into planning: adopt only if the app is pinned to Laravel ≤6 and the team accepts fork ownership in writing; otherwise, copy the ~150 lines of domain logic into the application or use Jetstream teams and avoid the dependency entirely.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment