Laravel启动器

filament-team-guard — Laravel 启动器模板

作者 MominAlZaraa

基于 Filament 构建的 Laravel 启动器,参照已停维护的 Jetstream 提供认证、个人资料、2FA、通行密钥、团队与 API 令牌等模块。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

1 个预览视图
作者提供的预览
作者提供的预览

来自项目 README 的原始预览。

目前有 1 张原始预览,可打开完整图片查看设计细节。

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-03查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

以 Filament 面板实现 Jetstream 风格的认证、个人资料与团队界面

02

支持 TOTP 两步验证、恢复码与 Spatie Laravel Passkeys 通行密钥

03

可选 Cloudflare Turnstile 人机校验,覆盖登录注册与 2FA 挑战

04

团队模块含创建、邮件邀请、角色与成员增删改

05

Action 类、邮件模板与语言文件均可通过 vendor:publish 发布定制

06

可选 Sanctum 风格 API 令牌,权限与菜单项可配置

模板详细介绍

Filament Team Guard 是一个以 Composer 包形式分发的 Laravel 启动器,用 Filament 面板承载原本由 Laravel Jetstream 提供的用户与团队功能。它通过 `composer require mominalzaraa/filament-team-guard` 安装,再执行 `php artisan filament-team-guard:install`,可选 `--teams` 与 `--api` 开关决定是否引入团队和 API 令牌模块。功能覆盖登录、注册、密码重置、邮箱验证、个人资料(头像、信息、密码、会话、删除账号)、TOTP 两步验证与恢复码、Spatie Laravel Passkeys 通行密钥、Cloudflare Turnstile 人机校验,以及团队创建、邀请、角色与成员管理。

相比 stephenjude/filament-jetstream,它把 Action 类做成可发布并带契约,包括 UpdateUserProfileInformation、InviteTeamMember、AddTeamMember、RemoveTeamMember、UpdateTeamMemberRole、CreateTeam、UpdateTeamName、DeleteTeam、ValidateTeamDeletion、DeleteUser;邮件邀请区分已注册与未注册流程,未注册时引导创建账号,不做自动注册。个人资料字段可通过发布 Action 后覆写 getFieldComponents()、getSectionHeading()、getSectionDescription() 扩展,并配合 lang/{locale}/filament-team-guard.php 翻译键。

限制方面,README 声明支持 PHP 8.3–8.5、Laravel 12、Filament 5、Livewire 4、Tailwind 4,PHP 低于 8.3、Filament v4 与 Laravel 12 以下为弃用状态;已有 Laravel 项目需要按文档发布迁移并让 User 模型实现相应接口。代码采用 MIT 许可,但演示图片、字体、图标等第三方素材需单独核对许可,域名、托管、数据库与支付等外部服务可能另行收费。

Laravel启动器

适合你的项目吗?

适用场景

  • 新 Laravel 项目需要带团队与角色管理的后台起点
  • 为已有 Laravel 应用补充 Filament 个人资料与两步验证页面
  • 需要可发布 Action 类以覆写资料字段或团队邀请逻辑的项目
  • 希望用通行密钥替代或补充密码登录的 Filament 面板

适合人群

  • 使用 Laravel 12 与 Filament 5 的开发者
  • 需要团队邀请与成员角色管理的后台项目
  • 希望参照 Jetstream 模式但改用 Filament UI 的团队
  • 需要多语言语言文件与可发布邮件模板的项目

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    通过 composer require mominalzaraa/filament-team-guard 安装,再运行 php artisan filament-team-guard:install,按需附加 --teams 或 --api

  2. 2

    启用 Turnstile 需在 .env 配置 TURNSTILE_* 并执行 php artisan turnstile:install

  3. 3

    定制 Action、语言文件与邮件模板分别使用 vendor:publish 的 filament-team-guard-actions、-lang、-email-templates 标签

  4. 4

    接入已有项目需发布迁移,并让 User 模型实现 HasAvatar、HasPasskeys、HasTenants、HasApiTokens 等对应接口

  5. 5

    README 声明支持 PHP 8.3–8.5、Laravel 12、Filament 5、Livewire 4、Tailwind 4,低版本为弃用状态

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 使用需满足 PHP 8.3–8.5、Laravel 12、Filament 5、Livewire 4、Tailwind 4;PHP 低于 8.3、Filament v4 与 Laravel 12 以下为弃用状态。
  • 启用 Cloudflare Turnstile 人机校验需在 .env 配置 TURNSTILE_* 并执行 php artisan turnstile:install,依赖外部服务。
  • 通行密钥功能依赖第三方包 Spatie Laravel Passkeys,需按其要求安装与配置。
  • 接入已有 Laravel 项目需发布迁移并让 User 模型实现 HasAvatar、HasPasskeys 等接口,非开箱即用。
  • 团队模块在已有项目中需发布团队迁移并让 User 实现 HasTenants 接口。
  • API 令牌模块需发布团队迁移并让 User 实现 HasApiTokens 接口。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

**Requirements**: PHP ^8.3 | ^8.4 | ^8.5 · Laravel ^12.0 · Filament ^5.0 (Livewire ^4.0, Tailwind ^4.0)

README 原文

**Cloudflare Turnstile** — Optional `->turnstile()` on auth + 2FA challenge/recovery.

README 原文

- **2FA & passkeys** — Embedded TOTP, recovery codes, [Spatie Laravel Passkeys](https://github.com/spatie/laravel-passkeys).

README 原文

- **Profile**: `php artisan vendor:publish --tag=filament-team-guard-migrations --tag=passkeys-migrations` → add `InteractsWithProfile`, `HasProfilePhoto`, implement `HasAvatar` & `HasPasskeys` on User

README 原文

- **Teams**: `php artisan vendor:publish --tag=filament-team-guard-team-migration` → add `InteractsWithTeams`, implement `HasTenants` on User.

README 原文

- **API**: Same team migration tag → add `HasApiTokens` on User.

README 原文
https://github.com/MominAlZaraa/filament-team-guard/blob/main/LICENSE.mdhttps://github.com/MominAlZaraa/filament-team-guard/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-03。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料一般 · 71 / 100
技术栈
Laravel
网站类型
启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-08-13
截图检查日期
2026-10-03

目前没有记录演示链接。请依据仓库说明在本地评估;仅凭截图无法确认交互行为。

目录记录的主要技术栈是 Laravel。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

审核声明: [email protected] · 2026-10-04

查看当时使用的来源资料

SHA-256: c17819b9a842a92eff4804c958a1d20682bcad86d278fa182e27212a97534530

2026-10-03T19:27:03.283Z

来源文件 / 仓库
# Filament Team Guard — Enhanced Laravel Starter Kit Built With Filament

[![Latest Version on Packagist](https://img.shields.io/packagist/v/mominalzaraa/filament-team-guard?style=flat-square&logo=packagist)](https://packagist.org/packages/mominalzaraa/filament-team-guard)
[![Total Downloads](https://img.shields.io/packagist/dt/mominalzaraa/filament-team-guard?style=flat-square&logo=packagist)](https://packagist.org/packages/mominalzaraa/filament-team-guard)
[![GitHub Tests](https://img.shields.io/github/actions/workflow/status/MominAlZaraa/filament-team-guard/run-tests.yml?branch=main&label=tests&style=flat-square&logo=github)](https://github.com/MominAlZaraa/filament-team-guard/actions/workflows/run-tests.yml)
[![Code Style](https://img.shields.io/github/actions/workflow/status/MominAlZaraa/filament-team-guard/code-style.yml?branch=main&label=code%20style&style=flat-square&logo=github)](https://github.com/MominAlZaraa/filament-team-guard/actions/workflows/code-style.yml)
[![License](https://img.shields.io/packagist/l/mominalzaraa/filament-team-guard?style=flat-square)](https://github.com/MominAlZaraa/filament-team-guard/blob/main/LICENSE.md)
[![PHP Version](https://img.shields.io/packagist/dependency-v/mominalzaraa/filament-team-guard/php?style=flat-square&logo=php)](https://packagist.org/packages/mominalzaraa/filament-team-guard)
[![Sponsor](https://img.shields.io/github/sponsors/MominAlZaraa?style=flat-square&logo=github)](https://github.com/sponsors/MominAlZaraa)
[![Plumb score](https://plumbphp.dev/badges/mominalzaraa/filament-team-guard/composite.svg)](https://plumbphp.dev/mominalzaraa/filament-team-guard)
[![Plumb security score](https://plumbphp.dev/badges/mominalzaraa/filament-team-guard/security.svg)](https://plumbphp.dev/mominalzaraa/filament-team-guard)

![Filament Team Guard Banner](https://raw.githubusercontent.com/MominAlZaraa/filament-team-guard/main/.github/plugin-banner.jpg)

**Requirements**: PHP ^8.3 | ^8.4 | ^8.5 · Laravel ^12.0 · Filament ^5.0 (Livewire ^4.0, Tailwind ^4.0)

Enhanced Laravel starter kit built with Filament, inspired by [Laravel Jetstream](https://github.com/laravel/jetstream) (discontinued). Brings **team features, mature data handling, and Filament UI**—auth, registration, 2FA, passkeys, session management, API tokens, teams. Skip boilerplate, start building.

**Supported**: PHP ^8.3–^8.5, Filament ^5.0, Laravel ^12.0, Livewire ^4.0, Tailwind ^4.0 · **Deprecated**: PHP <8.3, Filament v4 (use [v1.x](https://github.com/MominAlZaraa/filament-team-guard/releases)), Laravel <12.

---

## Installation

```bash
composer require mominalzaraa/filament-team-guard
php artisan filament-team-guard:install --teams --api
```

Omit `--teams` / `--api` if not needed. Action classes and email templates are published for customization.

---

## Features

- **Auth** — Login, register, password reset, email verification
- **Profile** — Photo, info, password, sessions, delete account
- **2FA & passkeys** — Embedded TOTP, recovery codes, [Spatie Laravel Passkeys](https://github.com/spatie/laravel-passkeys). Enable via `->twoFactorAuthentication()`.
- **Cloudflare Turnstile** — Optional `->turnstile()` on auth + 2FA challenge/recovery. [njoguamos/laravel-turnstile](https://github.com/njoguamos/laravel-turnstile); set `TURNSTILE_*` in `.env`, run `php artisan turnstile:install`.
- **Teams** — Create, invite, roles, member management (add/remove/update role)
- **API tokens** — Optional Sanctum-style tokens
- **i18n** — Publishable locale-first language files

---

## Enhanced vs stephenjude/filament-jetstream

- **Publishable Action classes** (Jetstream pattern): `UpdateUserProfileInformation`, `InviteTeamMember`, `AddTeamMember`, `RemoveTeamMember`, `UpdateTeamMemberRole`, `CreateTeam`, `UpdateTeamName`, `DeleteTeam`, `ValidateTeamDeletion`, `DeleteUser` — all with contracts.
- **Email invitations** — Registered/unregistered flow; “Create Account” when needed; session-based redirects; no auto-registration.
- **Profile fields** — Override `getFieldComponents()`, `getSectionHeading()`, `getSectionDescription()` in published Action; add translations in `lang/{locale}/filament-team-guard.php`.
- **Team management** — Custom `Role` rule, `UpdateTeamMemberRole`, `RemoveTeamMember`, `ValidateTeamDeletion`.
- **Publishable** — Actions, emails, lang; locale-first translations with merge/override.

---

## Customization

| What | Command |
|------|--------|
| Action classes | `php artisan vendor:publish --tag=filament-team-guard-actions` |
| Language files | `php artisan vendor:publish --tag=filament-team-guard-lang` |
| Email templates | `php artisan vendor:publish --tag=filament-team-guard-email-templates` |

**Profile field example**: Publish actions + lang → add key in `lang/en/filament-team-guard.php` → in `UpdateUserProfileInformation` override `getFieldComponents()` and add a `TextInput::make('surname')` (and translation) → add `surname` to User `$fillable`.

---

## Configuration (snippets)

**Profile (2FA, passkeys, photo, etc.)**
```php
JetstreamPlugin::make()
    ->configureUserModel(userModel: User::class)
    ->profilePhoto(condition: fn() => true, disk: 'public')
    ->deleteAccount(condition: fn() => true)
    ->updatePassword(condition: fn() => true, Password::default())
    ->profileInformation(condition: fn() => true)
    ->logoutBrowserSessions(condition: fn() => true)
    ->twoFactorAuthentication(
        condition: fn() => auth()->check(),
        forced: fn() => app()->isProduction(),
        enablePasskey: fn() => Feature::active('passkey'),
        requiresPassword: fn() => app()->isProduction(),
    );
```

**Teams**
```php
JetstreamPlugin::make()
    ->teams(condition: fn() => Feature::active('teams'), acceptTeamInvitation: fn($id) => JetstreamPlugin::make()->defaultAcceptTeamInvitation())
    ->configureTeamModels(teamModel: Team::class, roleModel: Role::class, membershipModel: Membership::class, teamInvitationModel: TeamInvitation::class);
```

**API tokens**
```php
JetstreamPlugin::make()->apiTokens(condition: fn() => Feature::active('api'), permissions: fn() => ['create','read','update','delete'], menuItemLabel: fn() => 'API Tokens', menuItemIcon: fn() => 'heroicon-o-key');
```

---

## Existing Laravel projects

- **Profile**: `php artisan vendor:publish --tag=filament-team-guard-migrations --tag=passkeys-migrations` → add `InteractsWithProfile`, `HasProfilePhoto`, implement `HasAvatar` & `HasPasskeys` on User; hide 2FA fields; append `profile_photo_url`.
- **Teams**: `php artisan vendor:publish --tag=filament-team-guard-team-migration` → add `InteractsWithTeams`, implement `HasTenants` on User.
- **API**: Same team migration tag → add `HasApiTokens` on User.

---

## Package development

Run `composer install` in the package root for tests. `vendor/` is in `.gitignore` and not distributed; `composer require mominalzaraa/filament-team-guard` in an app only pulls package source—the app’s Composer resolves Filament once (no duplication). `.gitattributes` has `/vendor export-ignore`.

---

## Testing · Changelog · Contributing

- **Tests**: `composer test`
- **Changelog**: [CHANGELOG.md](CHANGELOG.md)
- **Contributing**: [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md)

## Credits

- [Laravel Jetstream](https://github.com/laravel/jetstream) (discontinued) — team features & Action pattern
- [stephenjude/filament-jetstream](https://github.com/stephenjude/filament-jetstream) — Filament port
- [Momin Al Zaraa](https://github.com/MominAlZaraa) — this enhanced version · [Issues](https://github.com/MominAlZaraa/filament-team-guard/issues) · [email protected]

**License**: MIT. See [LICENSE.md](LICENSE.md).
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。