nyoncode/laravel-package-toolkit
Toolkit for building Laravel packages with less boilerplate: configure routes, migrations, translations, views/components, middleware, assets and commands. Includes install/about commands, publishing options, lifecycle hooks, and package-specific exception handling.
Packager) to define package resources (routes, migrations, views, etc.) without manual boilerplate. This aligns with Laravel’s service provider pattern and package development best practices.registeringPackage, bootingPackage, etc.) allow granular control over package initialization, enabling clean separation of registration, booting, and runtime logic.whenLocal(), whenProduction()) reduces bloat in production and simplifies local development, fitting Laravel’s environment-agnostic design.hasMiddlewareGlobals).Packager DSL be extended for non-standard resources (e.g., custom Artisan commands with dynamic signatures)?whenEnvironment) in high-traffic applications?ExceptionHandler) for package-specific exceptions?resources/views, database/migrations).PackageServiceProvider.hasRoutes()/hasMigrations().Packable implementations).register()/boot() methods can be incrementally migrated.PackageServiceProvider without replacing existing logic.RouteServiceProvider, ConfigPublisher) and avoids global state.composer require with --with-all-dependencies to catch conflicts early.Vendor/Package) to avoid short-name collisions.configure() method) in isolation.RouteServiceProvider).configure() method, reducing context-switching.configure() readable.Packager methods), all dependent packages must upgrade simultaneously.registeringPackage for dependency issues).whenEnvironment) can obscure the root cause of missing resources (e.g., a route not loading because isInProduction() returned false).PackageServiceProvider.PackageException class for consistent error reporting.whenEnvironment) is resolved during package registration, not per-request.vendor:publish, but this is a Laravel-wide issue.configure() methods may requireHow can I help you explore Laravel packages today?