Laravel Boost
Claude Code + MCP优化协作Laravel开发模板
特性
- 高级11+PHP 8.3 -最新Laravel框架结构
- Claude Code统合 - AI支援开发最优化CLAUDE.md
- MCP连携 - filesystem, GitHub, Context7, Supabase対応
- Docker环境 -立即构建开发环境
- 自定义斜线命令 -
/artisan, /make-feature, /test, /migrate, /deploy - CI/CD - GitHub Actions 自动测试部署
- 清洁建筑 - Repository + Service 模式
快速开始
1.克隆和设置
# リポジトリをクローン
git clone https://github.com/AIUELAB/laravel-claude-code-template.git my-project
cd my-project
# 環境変数をコピー
cp .env.example .env
# Docker起動
docker compose up -d
# 依存関係インストール
docker compose exec app composer install
# アプリケーションキー生成
docker compose exec app php artisan key:generate
# マイグレーション実行
docker compose exec app php artisan migrate
2.访问
| 服务 | URL |
|---|
| 应用程序 | http://localhost:8080 |
| 邮件坑 | http://localhost:8025 |
| MySQL | 本地主机:3306 |
| Redis | 本地主机:6379 |
项目结构
.
├── .claude/
│ └── commands/ # カスタムスラッシュコマンド
│ ├── artisan.md # Artisan実行
│ ├── make-feature.md # 機能生成
│ ├── test.md # テスト実行
│ ├── migrate.md # マイグレーション
│ └── deploy.md # デプロイチェックリスト
├── .github/
│ └── workflows/ # GitHub Actions CI/CD
├── app/
│ ├── Http/ # Controllers, Requests, Resources
│ ├── Domain/ # Business logic
│ │ ├── Models/
│ │ ├── Services/
│ │ └── Repositories/
│ └── Infrastructure/ # External services
├── docker/ # Docker設定
├── mcp-config/
│ └── profiles/ # MCPプロファイル
└── CLAUDE.md # Claude Code指示書
Slash命令
| 命令 | 描述 |
|---|
/artisan | Artisan执行命令 |
/make-feature | 完全な机能を生成(Controller,Service,Repository,Tests) |
/test | PHPUnit运行测试 |
/migrate 执行迁移(带安全检查) |
/deploy 查看部署检查列表 |
MCP配置文件
| 简介 | 代币 | MCP |
|---|
minimal | ~600 | 文件系统 |
standard | ~1800 | 文件系统,github,context7 |
full | ~ 3500 | +postgres,勇敢的搜索,suabase |
发展
测试运行
docker compose exec app php artisan test
代码样式
# フォーマット
docker compose exec app ./vendor/bin/pint
# 静的解析
docker compose exec app ./vendor/bin/phpstan analyse
新机能追加
# Claude Codeで /make-feature Product を実行すると:
# - Model + Migration + Factory + Seeder
# - Controller (API Resource)
# - Form Requests
# - Repository Interface + Implementation
# - Service
# - Tests
# が自動生成されます
Docker命令
# 起動
docker compose up -d
# 停止
docker compose down
# ログ確認
docker compose logs -f app
# コンテナに入る
docker compose exec app bash
# キャッシュクリア
docker compose exec app php artisan optimize:clear
环境变量
# .env
APP_NAME=LaravelBoost
APP_ENV=local
APP_DEBUG=true
APP_URL=http://localhost:8080
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=laravel
DB_PASSWORD=secret
CACHE_DRIVER=redis
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis
贡献
- 复刻仓库
- 创建功能分支(
git checkout -b feature/amazing-feature) - 提交您的更改(
git commit -m 'Add some amazing feature') - 推到分支(
git push origin feature/amazing-feature) - 打开拉取请求
许可证
MIT许可证