---
title: "Teams for Laravel — docs | Roundly"
description: "Developer docs for Teams for Laravel: teams, roles and permissions, Gate and Blade checks, invites with seat pools, join requests and time-boxed members."
url: https://roundly-consulting.com/open-source/docs/teams-for-laravel
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

Open source

# Teams for Laravel

Install

`composer require roundly-consulting/teams-for-laravel`

Requires: PHP ^8.4 · Laravel ^12.0|^13.0

[GitHub](https://github.com/roundly-consulting/teams-for-laravel) [Packagist](https://packagist.org/packages/roundly-consulting/teams-for-laravel) [Donate (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Patreon](https://www.patreon.com/cw/roundly)

## Overview

Teams, roles, permissions and invitations for Laravel. Any Eloquent model can own and join teams; members carry a role, roles carry permissions, and teams issue expiring, email-targeted invites or take join requests. A discoverable Teams facade with team-scoped handles expresses the common operations in one line, every operation is a testable action class, and authorization runs through Laravel’s own Gate and Blade. MIT-licensed and dependency-light — Laravel plus a few small sibling Roundly packages that Composer installs for you.

### What you get

#### Teams, members & ownership

Any Eloquent model can own and join many teams. Ownership transfer keeps the previous owner on the team as an admin.

#### Roles, per team if needed

Register roles in code or the database with an optional cache, and let one workspace’s Editor do more than another’s.

#### Facade, DI or actions

Teams::for($team) handles cover every operation — or inject TeamsManager, or call the actions. Teams::fake() records it all.

#### Native Gate & Blade

$user->can('teams.<permission>', $team), a built-in owner ability, and @teamPermission, @teamRole and @teamOwner.

#### Invites & seat pools

Expiring, email-targeted, single- or multi-use invites with a seat ledger, resend, revoke and accept-by-code.

#### Join requests & team settings

Users ask to join, admins decide. Per-team join policy, seat caps and optional multi-admin sign-off.

#### Time-boxed membership

Give members an end date, report who lapses soon, and prune expired memberships on a schedule.

### Documentation

#### [Installation](https://roundly-consulting.com/open-source/docs/teams-for-laravel/installation.md)

Install via Composer, publish and run the teams migrations plus those of the five sibling packages, and optionally publish config and stubs.

#### [Configuration](https://roundly-consulting.com/open-source/docs/teams-for-laravel/configuration.md)

Every config key and its default — models, morph key type, role driver and cache, invite and membership lifecycle, approvals and the Gate.

#### [Model traits](https://roundly-consulting.com/open-source/docs/teams-for-laravel/model-traits.md)

HasTeams gives any model memberships, ownership, role and permission helpers; BelongsToTeam adds a switchable current team.

#### [The Teams facade](https://roundly-consulting.com/open-source/docs/teams-for-laravel/facade.md)

One entry point: Teams::for($team) handles for members, invites, join requests and roles, plus global roles, permissions and housekeeping.

#### [DI, actions & DTOs](https://roundly-consulting.com/open-source/docs/teams-for-laravel/actions-and-dtos.md)

Inject TeamsManager instead of the facade, or call the 17 single-purpose actions with their typed DTOs from your own jobs and commands.

#### [Creating teams](https://roundly-consulting.com/open-source/docs/teams-for-laravel/creating-teams.md)

Create a team and seat its owner with Teams::create(), create rows directly when you need to, and query teams with scopes and relations.

#### [Ownership](https://roundly-consulting.com/open-source/docs/teams-for-laravel/ownership.md)

Check and transfer team ownership; the previous owner stays on as an admin, and a built-in owner ability replaces owner-only permissions.

#### [Members](https://roundly-consulting.com/open-source/docs/teams-for-laravel/members.md)

Add, remove and inspect members; one row per member, idempotent adds that revive removed members, role-change events and soft-delete removal.

#### [Time-boxed memberships](https://roundly-consulting.com/open-source/docs/teams-for-laravel/time-boxed-memberships.md)

Give members an end date, renew in place, report who lapses soon with optional reminder events, and prune expired rows.

#### [Roles](https://roundly-consulting.com/open-source/docs/teams-for-laravel/roles.md)

Register roles with permissions in code or the database, use the \* wildcard, and cache the database driver.

#### [Per-team role overrides](https://roundly-consulting.com/open-source/docs/teams-for-laravel/per-team-roles.md)

Let each team redefine a role’s permissions on top of the global roles — tenant-scoped, off by default, zero queries when disabled.

#### [Permissions](https://roundly-consulting.com/open-source/docs/teams-for-laravel/permissions.md)

A permission registry for picker UIs with groups and role harvesting, plus programmatic permission and role checks.

#### [Gate, Blade & policies](https://roundly-consulting.com/open-source/docs/teams-for-laravel/authorization.md)

Authorize with $user->can('teams.<permission>', $team), @teamPermission / @teamRole / @teamOwner, and scaffolded team policies.

#### [Invitations](https://roundly-consulting.com/open-source/docs/teams-for-laravel/invitations.md)

Issue expiring, email-targeted invites, accept them by code, resend or revoke them, and wire the publishable accept route.

#### [Multi-use invites & seat pools](https://roundly-consulting.com/open-source/docs/teams-for-laravel/seat-pools.md)

Issue invite links usable N times or without limit, track consumed and remaining seats, and audit exactly who joined through each link.

#### [Join requests](https://roundly-consulting.com/open-source/docs/teams-for-laravel/join-requests.md)

Let users ask to join a team, approve or deny with role fallback, set optional deadlines, and auto-decline stale requests.

#### [Team settings](https://roundly-consulting.com/open-source/docs/teams-for-laravel/team-settings.md)

Typed per-team governance: join policy, seat cap, default member role and require-approval, backed by options-for-laravel.

#### [Integrations](https://roundly-consulting.com/open-source/docs/teams-for-laravel/integrations.md)

Multi-admin join sign-off via approvals, plus team contacts, addresses and team-to-team connections from sibling Roundly packages.

#### [Events](https://roundly-consulting.com/open-source/docs/teams-for-laravel/events.md)

Fourteen events cover members, invites, ownership, join requests and expiry — plus a queued subscriber stub for notifications.

#### [Artisan commands](https://roundly-consulting.com/open-source/docs/teams-for-laravel/commands.md)

Eight commands list roles and permissions, resend and prune invites, report and prune memberships, expire join requests and scaffold policies.

#### [Exceptions](https://roundly-consulting.com/open-source/docs/teams-for-laravel/exceptions.md)

Typed exceptions for invites, join requests and members — expired, exhausted, revoked, already resolved — all extending TeamsException.

#### [Models & schema](https://roundly-consulting.com/open-source/docs/teams-for-laravel/models-and-schema.md)

The six tables and models, swapping in your own model subclasses, and replacing the role provider.

#### [Testing](https://roundly-consulting.com/open-source/docs/teams-for-laravel/testing.md)

Teams::fake() records every operation while still performing it, with an assertion per operation; Pest matchers and factories keep tests short.

#### [Requirements](https://roundly-consulting.com/open-source/docs/teams-for-laravel/requirements.md)

PHP 8.4+, Laravel 12 or 13, and seven small sibling Roundly packages that Composer installs for you.

## Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

[More ways to support, including crypto](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source.md)
