https://github.com/stats4sd/filament-team-management
Package for an opinionated 'teams' setup, including invites and integration with Laravel Filament + Spatie User Roles
https://github.com/stats4sd/filament-team-management
Last synced: 12 months ago
JSON representation
Package for an opinionated 'teams' setup, including invites and integration with Laravel Filament + Spatie User Roles
- Host: GitHub
- URL: https://github.com/stats4sd/filament-team-management
- Owner: stats4sd
- License: mit
- Created: 2024-10-17T13:30:12.000Z (over 1 year ago)
- Default Branch: dev
- Last Pushed: 2025-07-08T15:52:29.000Z (12 months ago)
- Last Synced: 2025-07-08T16:51:47.953Z (12 months ago)
- Language: PHP
- Size: 288 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# Filament Team Management
[](https://packagist.org/packages/stats4sd/filament-team-management)
[](https://github.com/stats4sd/filament-team-management/actions?query=workflow%3Arun-tests+branch%3Amain)
[](https://github.com/stats4sd/filament-team-management/actions?query=workflow%3A"Fix+PHP+code+styling"+branch%3Amain)
[](https://packagist.org/packages/stats4sd/filament-team-management)
Package for an opinionated 'teams' setup, including invites and integration with Laravel Filament + Spatie User Roles.
## Installation
You can install the package via composer:
```bash
composer require stats4sd/filament-team-management
```
Then, run the provided installation script.
```bash
php artisan filament-team-management:install
```
The script will ask you if you want to use the concept of "programs" in your app. Based on your response, it will publish the appropriate migration files and update your .env file with the appropriate variables. It will also offer to add some example Database Seeders to your main `database/seeders/DatabaseSeeder.php` file.
For a full guide on how to set this package up with a brand new Laravel installation, see [SETUP.md](SETUP.md)
## Features
This app provides a set of models, Filament Resources and Mail classes that lets you quickly setup a Filament-based application that uses Teams to manage users.
### Filament Resources
The intention is that this package is used for apps where you have 2 different Filament Panels:
- An "Admin" panel, for administrators to manage users and teams.
- An "App" panel, which uses multitenancy with teams as the tennant.
You can also optionally use 'programs', which are groups of teams. In this case, you may have a 3rd panel:
- A "Program" panel, for program managers to manage the users and teams within their own program.
The Resources in this package are intended for one of these 3 panels, shown by their namespacing within the package. You can add these Resource classes to any panel in your `PanelProvider` class:
```php
$panel
## add all resources in a namespace at once
->discoverResources(in: app_path('../vendor/stats4sd/filament-team-management/src/Filament/Admin/Resources'), for: 'Stats4sd\\FilamentTeamManagement\\Admin\\Resources)
## OR... add resources individually
->resources([
Stats4sd\\FilamentTeamManagement\\Admin\\Resources\\TeamResource,
...
])
```
### Invitations
This package includes the needed setup to let your users invite other users via email. You can invite a new user to join a specific team, a specific program, or with an assigned site-wide role.
To make the registration work, you **must** add the pages in the namespace `Stats4sd\\FilamentTeamManagement\\App\\Pages` to one of your Panels. Otherwise the registration page will not be correctly registered in the app.
For example:
```php
$panel
->discoverPages(in: app_path('../vendor/stats4sd/filament-team-management/src/Filament/App/Pages'), for: 'Stats4sd\\FilamentTeamManagement\\Filament\\App\\Pages')
```
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [Dan Tang](https://github.com/stats4sd)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.