laravel-providers
18
总安装量
11
周安装量
#19204
全站排名
安装命令
npx skills add https://github.com/leeovery/claude-laravel --skill laravel-providers
Agent 安装分布
claude-code
10
codex
8
opencode
8
antigravity
8
cursor
7
gemini-cli
7
Skill 文档
Laravel Providers
Service providers and application bootstrapping patterns.
Core Concepts
service-providers.md – Service providers:
- AppServiceProvider organization with named methods
- Model::unguard() for mass assignment
- Factory resolver for Data classes
- Morph map registration
- Configuration patterns
bootstrap-booters.md – Bootstrap & Booters:
- Invokable booter classes
- Middleware registration
- Exception handling setup
- Scheduling configuration
- Clean bootstrap organization
environment.md – Environment config:
- Template and instance pattern
.env-localtemplates- Git-ignored instances
- Optional git-crypt for secrets
helpers.md – Helper functions:
- Global helper registration
- Autoloading helpers
- When to use (sparingly)
- Alternatives with static methods
Pattern
// AppServiceProvider
final class AppServiceProvider extends ServiceProvider
{
public function boot(): void
{
$this->configureMorphMap();
$this->configureDataFactories();
Model::unguard();
}
private function configureMorphMap(): void
{
Relation::morphMap([
'order' => Order::class,
'product' => Product::class,
]);
}
}
Organize AppServiceProvider with named private methods for clarity.