lanciweb/laravel-make-crud
Laravel package that scaffolds full CRUD for a model via php artisan make:crud. Generates model, resource controller, migration, seeder, routes, and Blade views by default; supports Admin prefixes, API mode, and pick-and-choose options (controller, factory, policy, requests, views, etc.).
Pros:
Admin\Post), enabling logical separation of admin/API routes.--api flag for API-specific controllers (e.g., Api\PostController), reducing manual API route/configuration.index.blade.php, edit.blade.php, etc.), accelerating frontend development.Cons:
web.php (or api.php for --api), which could conflict with existing manual routes or middleware.make:crud updates.web.php/api.php may require manual cleanup if routes already exist./v1/posts), requiring manual prefixing or middleware.Customization Needs:
Route Management:
Testing Strategy:
--with-tests flag)?API Design:
--api, are there additional requirements (e.g., DTOs, API resources, rate limiting) beyond the generated controller?Database Schema:
Long-Term Maintenance:
--api flag for RESTful API controllers (uses Laravel’s Route::apiResource).--api for new API endpoints to avoid disrupting existing manual routes.make:crud for new features.composer require lanciweb/laravel-make-crud.config/app.php if needed.php artisan make:crud TestModel --api) and review:
routes/api.php).app/Http/Controllers/Api/TestModelController.php).resources/views/test-model/).resources/views/partials/crud/) for reusable components.make:crud with flags (--api, prefixes).resources/views/{model}/).git diff to track manual changes to generated files.--api controllers can be extended with queue jobs or caching (e.g., Laravel’s viaResource).Admin\Post) helps organize large codebases, but may require additional tooling (e.g., Laravel’s package:discover) for modular apps.| Failure Scenario | Mitigation Strategy | Recovery Plan |
|---|---|---|
| Route conflicts in `web.php |
How can I help you explore Laravel packages today?