About laravel-providers
laravel-providers is a skill for Laravel developers that documents service-provider organization and application bootstrapping patterns. It also covers environment configuration and helper functions.
Key features
- 01Organize AppServiceProvider methods
- 02Register morph maps and data factories
- 03Configure middleware, exceptions, and scheduling
- 04Use environment template and instance patterns
- 05Register and autoload helper functions
Use cases
- 01Structure an application's service-provider boot logic
- 02Set up middleware and exception handling during bootstrap
- 03Manage local environment configuration
- 04Decide when to use global helpers
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ leeovery/ agentic-skills --skill laravel-providersAfter installing, type/laravel-providersin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/bootstrap-booters.mdenvironment.mdhelpers.mdservice-providers.mdDetails
From the project READMELaravel 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.
Comments
Markdown supported