julio/capyrel
Capyrel is intelligent Laravel scaffolding: it reads your database schema and auto-generates Eloquent relationships plus models, controllers, Blade views, API resources, form requests, and Pest tests. Includes model mapping, safe migration scanning, and live model updates.
Pros:
hasMany, belongsToMany) eliminates N+1 query risks by default (via whenLoaded() in API Resources).migrate:safe) mitigates production risks from unsafe schema changes.Cons:
--force flag usage.*_id for FKs, snake_case columns). Custom accessors/mutators or non-standard relationships may not generate correctly.model:watch introduces real-time file polling, which may impact CI/CD pipelines or shared hosting environments.model:scaffold runs may take time for large schemas (e.g., 50+ tables).model:tests) are basic and may not cover edge cases (e.g., soft deletes, polymorphic relationships).model:watch or frequent scaffolding affect build pipelines? Should it be disabled in CI?User model) to test scaffolding and conflict resolution.--dry-run to preview generated code before applying.model:scaffold for core entities (e.g., User, Post).model:resources to eliminate N+1 queries.model:requests for Form Requests, then refine rules manually.model:tests as a baseline, then expand with custom assertions.migrate:safe to catch risky changes before deployment.--exclude=Model to skip problematic tables.app/Models/UserCustom.php) and merge post-generation..gitattributes to avoid merge conflicts.model:tests).composer require julio/capyrel --dev
composer require pestphp/pest --dev # for tests
php artisan model:scaffold --dry-run to preview output.User, Post).model:resources) to eliminate N+1 queries.whenLoaded() relationships.model:requests) and refine rules as needed.model:tests) and expand with custom scenarios.model:watch in development to auto-update models on migration changes.migrate:safe before deploying migrations.model:map) and auto-generated tests simplify new developer ramp-up.migrate:safe reduce production issues from schema changes.How can I help you explore Laravel packages today?