Team Management
Peak includes robust team management features built on Laravel Jetstream, enabling each user to create and belong to multiple teams. This feature is ideal for multi-tenant SaaS applications where users collaborate or manage resources under different organizations or groups.
Personal Teams by Default​
Upon registration, every user is automatically assigned a personal team. For instance, if a user named Sally Jones signs up, she will be added to a personal team named Sally's Team. This ensures that users always have an initial context in which to use the application’s team-based features.
Users may later:
- Rename their personal team
- Create additional teams
- Switch between teams using the top-right team dropdown in the dashboard
Team Creation & Management​
To create a new team, users can navigate to:
User Dashboard → Team Dropdown → Create New Team
Each team has:
- A unique name
- A set of invited or assigned members
- Role-based permissions (owner, admin, member, etc.)
- Support for switching context between teams
Action Classes​
Like other features in Peak, the backend logic for team management is abstracted into action classes. These action classes, located in app/Actions/Jetstream
, handle team-related operations:
Action | Description |
---|---|
CreateTeam | Handles team creation logic |
UpdateTeamName | Responsible for updating a team’s name |
DeleteTeam | Safely deletes a team and its related data |
You may customize these classes to introduce:
- Additional team validation rules
- Event dispatching
- Team metadata
These actions are triggered automatically when the user performs the respective actions in the UI.
Customizing the View​
The team creation page is implemented using Vue and can be customized at:
resources/js/Themes/Breeze/Pages/Teams/Create.vue
If your application requires capturing additional information during team creation (e.g., company size, industry, contact phone number), you can update the form in this Vue file. These extra input fields will be passed to the CreateTeam
action class and are available for validation and persistence.
After making changes to this view, rebuild frontend assets using:
npm run dev
Disabling Teams​
If your application doesn’t require teams, you can disable this functionality via:
Admin Panel → Settings → Teams → Disable Team Features
Read More About Jetstream Teams​
For a deeper technical dive into Jetstream’s team features and how they’re structured under the hood, we recommend reviewing the official Laravel Jetstream documentation:
👉 Jetstream Teams Documentation (Official)
This includes:
- Team and membership database structures
- Using policies with teams
- Middleware and team context switching
- Advanced customization and overrides