Download the PHP package malico/teams without Composer
On this page you can find all versions of the php package malico/teams. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package teams
Short Description Team management functionality for Laravel applications.
License MIT
Informations about the package teams
Laravel Teams
A Laravel package that provides team management functionality for multi-tenant applications. Create teams, manage members, send invitations, and handle role-based permissions with a simple, extensible API.
Features
- Team Management: Create, update, and delete teams with owner relationships
- Member Management: Add and remove team members with role assignments
- Email Invitations: Send team invitations via email with signed URLs
- Role-Based Permissions: Flexible role system with custom permissions
- Personal Teams: Support for personal teams alongside collaborative teams
- Current Team Context: Switch between teams with user context management
- Event System: Events for all team operations (adding, removing, inviting, etc.)
- Multi-Stack Support: Livewire components included, Inertia.js support planned
- Authorization: Built-in policies and gates for secure operations
Requirements
- PHP 8.2 or higher
- Laravel 11.0 or 12.0
Installation
Install the package via Composer:
Run the installation command to set up the package:
Available installation options:
The installation process will:
- Publish database migrations for teams, memberships, and invitations
- Copy model stubs (Team, TeamInvitation, Membership, User)
- Install the TeamsServiceProvider
- Copy policy and listener classes
- Set up frontend components for your chosen stack
- Add team routes to your application
Configuration
User Model Setup
Add the HasTeams trait to your User model:
Team Roles Configuration
Define team roles in your TeamsServiceProvider or AppServiceProvider:
Note: Team owners automatically have all permissions (['*']) and don't need to be explicitly defined.
Usage
Creating Teams
Managing Team Members
Updating Teams
Checking Team Permissions
Working with Current Team
Deleting Teams
Frontend Integration
This package supports Livewire with planned Inertia.js support. The installation command will scaffold the appropriate components.
Livewire Stack
After installation with --stack=livewire, you'll have:
-
Volt Components: Functional Livewire components in
resources/views/pages/teams/create.blade.php- Team creation formshow.blade.php- Team management interfacemembers.blade.php- Member managementaccept-invitation.blade.php- Invitation acceptanceindex.blade.php- Teams listing
-
Supporting Views:
components/teams/layout.blade.php- Team layout componentpartials/teams-heading.blade.php- Team navigation partialemails/team-invitation.blade.php- Email template
- Routes: Team routes added to
routes/teams.php
Inertia.js Stack
Support for Inertia.js (React/Vue) components is planned for future releases.
Events
The package dispatches several events that you can listen to:
Team Events:
AddingTeam: Before creating a teamTeamCreated: After a team is createdTeamUpdated: After a team is updatedTeamDeleted: After a team is deleted
Member Events:
AddingTeamMember: Before adding a memberTeamMemberAdded: After a member is addedRemovingTeamMember: Before removing a memberTeamMemberRemoved: After a member is removedTeamMemberUpdated: After a member's role is updated
Invitation Events:
InvitingTeamMember: When sending an invitation
Authorization
The package includes authorization policies and gates:
- TeamPolicy: Controls team-level operations (view, update, delete, addTeamMember, etc.)
- Gates: Automatic policy registration for team operations
- Middleware: Built-in authorization checks in all actions
Customization
Override Default Actions
You can override any action in your TeamsServiceProvider:
Customize Models
You can specify custom models:
Configure Invitation Duration
Available Contracts
The package provides these contracts for dependency injection:
CreatesTeamsUpdatesTeamNamesDeletesTeamsValidatesTeamDeletionAddsTeamMembersRemovesTeamMembersInvitesTeamMembersAcceptsTeamInvitationsDeclinesTeamInvitationsUpdatesTeamMemberRoles
Testing
Run the package tests:
Contributing
- Fork the repository
- Create a feature branch
- Write tests for your changes
- Ensure all tests pass
- Submit a pull request
Credits
This package is a fork of Laravel Jetstream teams functionality, extracted into a standalone package for use in any Laravel application.
Special thanks to the Laravel team and contributors for the original implementation.
License
The MIT License (MIT). Please see License File for more information.
All versions of teams with dependencies
illuminate/console Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
symfony/console Version ^7.0