mcpField
L
laravel-providers

laravel-providers

github.com/leeoveryDevelopment1551 installsUpdated 2w ago
Repository

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

  1. 01Organize AppServiceProvider methods
  2. 02Register morph maps and data factories
  3. 03Configure middleware, exceptions, and scheduling
  4. 04Use environment template and instance patterns
  5. 05Register and autoload helper functions

Use cases

  1. 01Structure an application's service-provider boot logic
  2. 02Set up middleware and exception handling during bootstrap
  3. 03Manage local environment configuration
  4. 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-providers

After installing, type/laravel-providersin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
bootstrap-booters.md
environment.md
helpers.md
service-providers.md

Details

From the project README

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-local templates
  • 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