Summary
Add PHP Laravel framework support to Scafoldr's code generation system, enabling users to generate Laravel applications from DBML schemas.
Requirements
Backend (Core):
- Create Laravel template in core/templates/php_laravel/
- Add scafoldr_template_config.json with PHP/Laravel mappings
- Implement Eloquent model generation from DBML
- Generate Laravel controllers, routes, and middleware
- Add Laravel-specific type mappings (string, integer, timestamp, etc.)
Frontend:
- Update framework factory mapping: "php-laravel": "php_laravel"
- Remove comingSoon: true from framework selector
- Update generation message to show "PHP Laravel" instead of hardcoded text
Technical Details
Type Mappings (SQL → Laravel):
- varchar → string
- int → integer
- timestamp → timestamp
- text → text
- boolean → boolean
Generated Components:
- Eloquent models with relationships
- API resource controllers
- Form request validation
- Database migrations
- API routes with proper RESTful structure
Acceptance Criteria
- DBML schema generates working Laravel application
- Eloquent models include proper relationships (hasMany, belongsTo, etc.)
- Generated controllers follow Laravel conventions
- Database migrations are properly structured
- Application runs with php artisan serve
- All CRUD operations work through generated API routes
Summary
Requirements
Backend (Core):
Frontend:
Technical Details
Type Mappings (SQL → Laravel):
Generated Components:
Acceptance Criteria