mr.incognito/crudify
Laravel CRUD generator for API or web apps. One Artisan command scaffolds models, migrations, controllers, form requests, API resources, routes, and optional Blade views. Supports validation rules, nullable fields, foreign keys/constraints, defaults, excludes, and delete:crud cleanup.
Pros:
--exclude=model or --exclude=migration), allowing incremental adoption or customization of specific layers (e.g., keep migrations but override controllers).string|max:255) enforce consistency with Laravel’s validation system, reducing runtime errors.Cons:
app/Http/Controllers/Api/). Projects with custom structures (e.g., feature-based controllers) may need post-generation adjustments.composer require.Api\Generated\ vs. Api\Custom\).--exclude=views) and manually linking to custom templates.resources/views/ structure post-generation.timestamps vs. nullableTimestamps).migrate phase).| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Generated code quality | Medium | Review generated files for edge cases (e.g., validation rules, foreign key syntax). Use --exclude to opt out of problematic components. |
| Blade template rigidity | High | For web CRUDs, disable view generation (--exclude=views) and build custom templates. Pair with Inertia.js or Livewire for dynamic UIs. |
| Migration conflicts | High | Avoid generating migrations for existing tables. Use --exclude=migration and write custom migrations. |
| Validation oversights | Medium | Extend generated FormRequest classes for custom rules (e.g., unique:except,$id). |
| Testing gaps | Medium | Supplement built-in Pest tests with feature tests for critical CRUDs. Use delete:crud to clean up test artifacts. |
| Performance | Low | Generated controllers/resources follow Laravel best practices. Monitor API routes for bloat (e.g., unused fields in resources). |
| Long-term maintenance | Medium | Document customizations (e.g., "This CRUD uses a custom validator in App\Rules\"). Use composer update cautiously—test generated code after Laravel upgrades. |
Architecture:
Database:
Validation:
FormRequest classes or override them entirely?API Design:
Maintenance:
composer update.)Team Adoption:
--exclude flags)?make:model, make:controller) and want to reduce boilerplate.Pilot Phase (Low Risk):
TestModel) to validate output quality.php artisan make:crud Settings --fields="key:string|unique,value:text" --type=api
routes/api.php.Incremental Adoption:
php artisan make:crud UserProfile).--exclude=migration and write custom migrations.Customization:
app/CustomCruds/) and modify as needed.FormRequest classes.--exclude=views).Full Integration:
make:crud for new models, then extend controllers for custom logic").foreign~|constrained:users).--exclude=model).delete:crud.| Component | Compatibility Notes |
|---|---|
| Laravel | Tested on Laravel 10–13. May require adjustments for older versions. |
| PHP | Requires PHP |
How can I help you explore Laravel packages today?