dmp/cg-lib
CG library is a PHP 8.1+ toolset for generating PHP code. It helps assemble and enhance classes by adding reusable behaviors, making it easier to build and modify code structures programmatically during code generation workflows.
make:controller with preconfigured middleware, make:policy with role-based logic)."This lightweight PHP library automates the generation of Laravel boilerplate—think of it as a ‘copy-paste on steroids.’ For example, instead of manually creating a model, controller, and policy for a new feature (taking ~2 hours), we could generate 80% of it in minutes. This isn’t about replacing developers; it’s about letting them focus on business logic while reducing errors and onboarding time. Given its low maintenance overhead (PHP 8.1+ only) and open-source flexibility, it’s a low-risk way to accelerate development without vendor lock-in. We could even extend it to support our unique workflows, creating a competitive edge."
*"CG-lib fills a gap for teams that want fine-grained control over code generation beyond Laravel’s Artisan. Key benefits:
*"This tool could democratize development by letting non-engineers specify requirements (e.g., ‘I need a model with these fields and a policy for X’) and get working code faster. For example:
How can I help you explore Laravel packages today?